annotate test/CodeGen/AMDGPU/spill-to-smem-m0.ll @ 128:c347d3398279 default tip

fix
author mir3636
date Wed, 06 Dec 2017 14:37:17 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 ; RUN: llc -O0 -march=amdgcn -mcpu=fiji -amdgpu-spill-sgpr-to-smem=1 -verify-machineinstrs -stop-before=prologepilog < %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 ; Spill to SMEM clobbers M0. Check that the implicit-def dead operand is present
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 ; in the pseudo instructions.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 ; CHECK-LABEL: {{^}}spill_sgpr:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 ; CHECK: SI_SPILL_S32_SAVE {{.*}}, implicit-def dead %m0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 ; CHECK: SI_SPILL_S32_RESTORE {{.*}}, implicit-def dead %m0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 define amdgpu_kernel void @spill_sgpr(i32 addrspace(1)* %out, i32 %in) #0 {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 %sgpr = call i32 asm sideeffect "; def $0", "=s" () #0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 %cmp = icmp eq i32 %in, 0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 br i1 %cmp, label %bb0, label %ret
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 bb0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 call void asm sideeffect "; use $0", "s"(i32 %sgpr) #0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 br label %ret
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 ret:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 attributes #0 = { nounwind }