1 ; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
3 ; NOTE: llvm.amdgcn.wwm is deprecated, use llvm.amdgcn.strict.wwm instead.
6 define amdgpu_hs void @wwm(i32 inreg %arg, ptr addrspace(8) inreg %buffer) {
14 %tmp603 = phi i32 [ 0, %bb42 ], [ 1, %work ]
15 %tmp607 = icmp eq i32 %tmp603, %tmp1196
16 br i1 %tmp607, label %bb49, label %bb54
19 call void @llvm.amdgcn.raw.ptr.tbuffer.store.f32(float 1.0, ptr addrspace(8) %buffer, i32 4, i32 1, i32 116, i32 1)
26 ; GCN: s_not_b64 exec, exec
27 ; GCN: v_mov_b32_e32 v[[tmp1189:[0-9]+]], 1
28 ; GCN: s_not_b64 exec, exec
29 %tmp1189 = tail call i32 @llvm.amdgcn.set.inactive.i32(i32 4, i32 1)
31 ; GCN: s_or_saveexec_b64 s[[[LO:[0-9]+]]:[[HI:[0-9]+]]], -1
32 ; GCN: v_lshlrev_b32_e32 v[[tmp1191:[0-9]+]], 2, v[[tmp1189]]
33 %tmp1191 = mul i32 %tmp1189, 4
35 ; GCN: s_mov_b64 exec, s[[[LO]]:[[HI]]]
36 %tmp1196 = tail call i32 @llvm.amdgcn.wwm.i32(i32 %tmp1191)
38 %tmp34 = icmp eq i32 %arg, 0
39 br i1 %tmp34, label %bb602, label %bb42
42 ; GCN-LABEL: strict_wwm:
43 define amdgpu_hs void @strict_wwm(i32 inreg %arg, ptr addrspace(8) inreg %buffer) {
51 %tmp603 = phi i32 [ 0, %bb42 ], [ 1, %work ]
52 %tmp607 = icmp eq i32 %tmp603, %tmp1196
53 br i1 %tmp607, label %bb49, label %bb54
56 call void @llvm.amdgcn.raw.ptr.tbuffer.store.f32(float 1.0, ptr addrspace(8) %buffer, i32 4, i32 1, i32 116, i32 1)
63 ; GCN: s_not_b64 exec, exec
64 ; GCN: v_mov_b32_e32 v[[tmp1189:[0-9]+]], 1
65 ; GCN: s_not_b64 exec, exec
66 %tmp1189 = tail call i32 @llvm.amdgcn.set.inactive.i32(i32 4, i32 1)
68 ; GCN: s_or_saveexec_b64 s[[[LO:[0-9]+]]:[[HI:[0-9]+]]], -1
69 ; GCN: v_lshlrev_b32_e32 v[[tmp1191:[0-9]+]], 2, v[[tmp1189]]
70 %tmp1191 = mul i32 %tmp1189, 4
72 ; GCN: s_mov_b64 exec, s[[[LO]]:[[HI]]]
73 %tmp1196 = tail call i32 @llvm.amdgcn.strict.wwm.i32(i32 %tmp1191)
75 %tmp34 = icmp eq i32 %arg, 0
76 br i1 %tmp34, label %bb602, label %bb42
79 declare i32 @llvm.amdgcn.set.inactive.i32(i32, i32) #0
80 declare i32 @llvm.amdgcn.wwm.i32(i32) #1
81 declare i32 @llvm.amdgcn.strict.wwm.i32(i32) #1
82 declare void @llvm.amdgcn.raw.ptr.tbuffer.store.f32(float, ptr addrspace(8), i32, i32, i32 immarg, i32 immarg) #2
84 attributes #0 = { convergent nounwind readnone willreturn }
85 attributes #1 = { convergent nounwind readnone speculatable willreturn }
86 attributes #2 = { nounwind willreturn memory(argmem: write) }