source: icGREP/icgrep-devel/llvm-3.6.1.src/test/CodeGen/R600/copy-to-reg.ll @ 4664

Last change on this file since 4664 was 4664, checked in by cameron, 4 years ago

Upgrade LLVM to 3.6.1

File size: 868 bytes
Line 
1; RUN: llc -march=amdgcn -mcpu=SI -mattr=-promote-alloca -verify-machineinstrs < %s
2; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-promote-alloca -verify-machineinstrs < %s
3
4; Test that CopyToReg instructions don't have non-register operands prior
5; to being emitted.
6
7; Make sure this doesn't crash
8; CHECK-LABEL: {{^}}copy_to_reg_frameindex:
9define void @copy_to_reg_frameindex(i32 addrspace(1)* %out, i32 %a, i32 %b, i32 %c) {
10entry:
11  %alloca = alloca [16 x i32]
12  br label %loop
13
14loop:
15  %inc = phi i32 [0, %entry], [%inc.i, %loop]
16  %ptr = getelementptr [16 x i32]* %alloca, i32 0, i32 %inc
17  store i32 %inc, i32* %ptr
18  %inc.i = add i32 %inc, 1
19  %cnd = icmp uge i32 %inc.i, 16
20  br i1 %cnd, label %done, label %loop
21
22done:
23  %tmp0 = getelementptr [16 x i32]* %alloca, i32 0, i32 0
24  %tmp1 = load i32* %tmp0
25  store i32 %tmp1, i32 addrspace(1)* %out
26  ret void
27}
Note: See TracBrowser for help on using the repository browser.