1 ; RUN: llc -mtriple=amdgcn--amdpal -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
3 declare i64 @llvm.amdgcn.icmp.i32(i32, i32, i32) #0
4 declare i32 @llvm.amdgcn.set.inactive.i32(i32, i32) #0
5 declare i32 @llvm.amdgcn.wwm.i32(i32) #1
6 declare void @llvm.amdgcn.tbuffer.store.f32(float, <4 x i32>, i32, i32, i32, i32, i32, i32, i1, i1) #2
7 declare void @llvm.amdgcn.exp.f32(i32, i32, float, float, float, float, i1, i1) #2
9 define amdgpu_hs void @foo(i32 inreg %arg, <4 x i32> inreg %buffer) {
17 %tmp603 = phi i32 [ 0, %bb42 ], [ 1, %work ]
18 %tmp607 = icmp eq i32 %tmp603, %tmp1196
19 br i1 %tmp607, label %bb49, label %bb54
22 tail call void @llvm.amdgcn.tbuffer.store.f32(float 1.000000e+00, <4 x i32> %buffer, i32 0, i32 1, i32 1, i32 4, i32 4, i32 7, i1 true, i1 false) #7
29 ; GCN: s_not_b64 exec, exec
30 ; GCN: v_mov_b32_e32 v[[tmp1189:[0-9]+]], 1
31 ; GCN: s_not_b64 exec, exec
32 %tmp1189 = tail call i32 @llvm.amdgcn.set.inactive.i32(i32 4, i32 1)
34 ; GCN: s_or_saveexec_b64 s{{\[}}[[LO:[0-9]+]]:[[HI:[0-9]+]]{{\]}}, -1
35 ; GCN: v_lshlrev_b32_e32 v[[tmp1191:[0-9]+]], 2, v[[tmp1189]]
36 %tmp1191 = mul i32 %tmp1189, 4
38 ; GCN: s_mov_b64 exec, s{{\[}}[[LO]]:[[HI]]{{\]}}
39 %tmp1196 = tail call i32 @llvm.amdgcn.wwm.i32(i32 %tmp1191)
41 %tmp34 = icmp eq i32 %arg, 0
42 br i1 %tmp34, label %bb602, label %bb42
45 attributes #0 = { convergent nounwind readnone }
46 attributes #1 = { nounwind readnone speculatable }
47 attributes #2 = { nounwind writeonly }