Skip to content

Commit 1d47feb

Browse files
arsenmfrederik-h
authored andcommitted
AMDGPU: Replace <8 x i32> undef uses in tests with poison (llvm#130903)
1 parent 54decdf commit 1d47feb

16 files changed

+43
-43
lines changed

llvm/test/CodeGen/AMDGPU/adjust-writemask-invalid-copy.ll

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
; GCN: buffer_store_dword v0
88
define amdgpu_ps void @adjust_writemask_crash_0_nochain() #0 {
99
main_body:
10-
%tmp = call <2 x float> @llvm.amdgcn.image.getlod.1d.v2f32.f32(i32 3, float undef, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
10+
%tmp = call <2 x float> @llvm.amdgcn.image.getlod.1d.v2f32.f32(i32 3, float undef, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
1111
%tmp1 = bitcast <2 x float> %tmp to <2 x i32>
1212
%tmp2 = shufflevector <2 x i32> %tmp1, <2 x i32> poison, <4 x i32> <i32 1, i32 poison, i32 poison, i32 poison>
1313
%tmp3 = bitcast <4 x i32> %tmp2 to <4 x float>
@@ -23,7 +23,7 @@ main_body:
2323
; GCN: buffer_store_dword v0
2424
define amdgpu_ps void @adjust_writemask_crash_1_nochain() #0 {
2525
main_body:
26-
%tmp = call <2 x float> @llvm.amdgcn.image.getlod.1d.v2f32.f32(i32 3, float undef, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
26+
%tmp = call <2 x float> @llvm.amdgcn.image.getlod.1d.v2f32.f32(i32 3, float undef, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
2727
%tmp1 = bitcast <2 x float> %tmp to <2 x i32>
2828
%tmp2 = shufflevector <2 x i32> %tmp1, <2 x i32> poison, <4 x i32> <i32 1, i32 0, i32 poison, i32 poison>
2929
%tmp3 = bitcast <4 x i32> %tmp2 to <4 x float>
@@ -39,7 +39,7 @@ main_body:
3939
; GCN: buffer_store_dword v0
4040
define amdgpu_ps void @adjust_writemask_crash_0_chain() #0 {
4141
main_body:
42-
%tmp = call <2 x float> @llvm.amdgcn.image.sample.1d.v2f32.f32(i32 3, float undef, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
42+
%tmp = call <2 x float> @llvm.amdgcn.image.sample.1d.v2f32.f32(i32 3, float undef, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
4343
%tmp1 = bitcast <2 x float> %tmp to <2 x i32>
4444
%tmp2 = shufflevector <2 x i32> %tmp1, <2 x i32> poison, <4 x i32> <i32 1, i32 poison, i32 poison, i32 poison>
4545
%tmp3 = bitcast <4 x i32> %tmp2 to <4 x float>
@@ -55,7 +55,7 @@ main_body:
5555
; GCN: buffer_store_dword v0
5656
define amdgpu_ps void @adjust_writemask_crash_1_chain() #0 {
5757
main_body:
58-
%tmp = call <2 x float> @llvm.amdgcn.image.sample.1d.v2f32.f32(i32 3, float undef, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
58+
%tmp = call <2 x float> @llvm.amdgcn.image.sample.1d.v2f32.f32(i32 3, float undef, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
5959
%tmp1 = bitcast <2 x float> %tmp to <2 x i32>
6060
%tmp2 = shufflevector <2 x i32> %tmp1, <2 x i32> poison, <4 x i32> <i32 1, i32 0, i32 poison, i32 poison>
6161
%tmp3 = bitcast <4 x i32> %tmp2 to <4 x float>
@@ -66,7 +66,7 @@ main_body:
6666

6767
define amdgpu_ps void @adjust_writemask_crash_0_v4() #0 {
6868
main_body:
69-
%tmp = call <4 x float> @llvm.amdgcn.image.getlod.1d.v4f32.f32(i32 5, float undef, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
69+
%tmp = call <4 x float> @llvm.amdgcn.image.getlod.1d.v4f32.f32(i32 5, float undef, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
7070
%tmp1 = bitcast <4 x float> %tmp to <4 x i32>
7171
%tmp2 = shufflevector <4 x i32> %tmp1, <4 x i32> poison, <4 x i32> <i32 1, i32 poison, i32 poison, i32 poison>
7272
%tmp3 = bitcast <4 x i32> %tmp2 to <4 x float>

llvm/test/CodeGen/AMDGPU/commute-shifts.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ define amdgpu_ps float @main(float %arg0, float %arg1) #0 {
3030
; VI-NEXT: ; return to shader part epilog
3131
bb:
3232
%tmp = fptosi float %arg0 to i32
33-
%tmp1 = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 undef, <8 x i32> undef, i32 0, i32 0)
33+
%tmp1 = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 undef, <8 x i32> poison, i32 0, i32 0)
3434
%tmp2.f = extractelement <4 x float> %tmp1, i32 0
3535
%tmp2 = bitcast float %tmp2.f to i32
3636
%tmp3 = and i32 %tmp, 7

llvm/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll

+7-7
Original file line numberDiff line numberDiff line change
@@ -143,21 +143,21 @@ define amdgpu_ps float @_amdgpu_ps_main() #0 {
143143
; GFX11-NEXT: v_max_f32_e32 v0, 0, v1
144144
; GFX11-NEXT: ; return to shader part epilog
145145
.entry:
146-
%0 = call <3 x float> @llvm.amdgcn.image.sample.2d.v3f32.f32(i32 7, float undef, float undef, <8 x i32> undef, <4 x i32> poison, i1 false, i32 0, i32 0)
146+
%0 = call <3 x float> @llvm.amdgcn.image.sample.2d.v3f32.f32(i32 7, float undef, float undef, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)
147147
%.i2243 = extractelement <3 x float> %0, i32 2
148148
%1 = call <3 x i32> @llvm.amdgcn.s.buffer.load.v3i32(<4 x i32> poison, i32 0, i32 0)
149149
%2 = shufflevector <3 x i32> %1, <3 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 poison>
150150
%3 = bitcast <4 x i32> %2 to <4 x float>
151151
%.i2248 = extractelement <4 x float> %3, i32 2
152152
%.i2249 = fmul reassoc nnan nsz arcp contract afn float %.i2243, %.i2248
153153
%4 = call reassoc nnan nsz arcp contract afn float @llvm.amdgcn.fmed3.f32(float undef, float 0.000000e+00, float 1.000000e+00)
154-
%5 = call <3 x float> @llvm.amdgcn.image.sample.2d.v3f32.f32(i32 7, float undef, float undef, <8 x i32> undef, <4 x i32> poison, i1 false, i32 0, i32 0)
154+
%5 = call <3 x float> @llvm.amdgcn.image.sample.2d.v3f32.f32(i32 7, float undef, float undef, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)
155155
%.i2333 = extractelement <3 x float> %5, i32 2
156156
%6 = call reassoc nnan nsz arcp contract afn float @llvm.amdgcn.fmed3.f32(float undef, float 0.000000e+00, float 1.000000e+00)
157-
%7 = call <2 x float> @llvm.amdgcn.image.sample.2d.v2f32.f32(i32 3, float undef, float undef, <8 x i32> undef, <4 x i32> poison, i1 false, i32 0, i32 0)
157+
%7 = call <2 x float> @llvm.amdgcn.image.sample.2d.v2f32.f32(i32 3, float undef, float undef, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)
158158
%.i1408 = extractelement <2 x float> %7, i32 1
159159
%.i0364 = extractelement <2 x float> %7, i32 0
160-
%8 = call float @llvm.amdgcn.image.sample.2d.f32.f32(i32 1, float undef, float undef, <8 x i32> undef, <4 x i32> poison, i1 false, i32 0, i32 0)
160+
%8 = call float @llvm.amdgcn.image.sample.2d.f32.f32(i32 1, float undef, float undef, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)
161161
%9 = call <3 x i32> @llvm.amdgcn.s.buffer.load.v3i32(<4 x i32> poison, i32 112, i32 0)
162162
%10 = shufflevector <3 x i32> %9, <3 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 poison>
163163
%11 = bitcast <4 x i32> %10 to <4 x float>
@@ -204,10 +204,10 @@ define amdgpu_ps float @_amdgpu_ps_main() #0 {
204204
%40 = fmul reassoc nnan nsz arcp contract afn float %39, 0x3F847AE140000000
205205
%41 = fadd reassoc nnan nsz arcp contract afn float %40, 0x3F947AE140000000
206206
%.i2415 = fmul reassoc nnan nsz arcp contract afn float %.i2407, %41
207-
%42 = call <3 x float> @llvm.amdgcn.image.load.mip.2d.v3f32.i32(i32 7, i32 undef, i32 undef, i32 0, <8 x i32> undef, i32 0, i32 0)
207+
%42 = call <3 x float> @llvm.amdgcn.image.load.mip.2d.v3f32.i32(i32 7, i32 undef, i32 undef, i32 0, <8 x i32> poison, i32 0, i32 0)
208208
%.i2521 = extractelement <3 x float> %42, i32 2
209209
%43 = call reassoc nnan nsz arcp contract afn float @llvm.amdgcn.fmed3.f32(float undef, float 0.000000e+00, float 1.000000e+00)
210-
%44 = call <3 x float> @llvm.amdgcn.image.sample.2d.v3f32.f32(i32 7, float undef, float undef, <8 x i32> undef, <4 x i32> poison, i1 false, i32 0, i32 0)
210+
%44 = call <3 x float> @llvm.amdgcn.image.sample.2d.v3f32.f32(i32 7, float undef, float undef, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)
211211
%.i2465 = extractelement <3 x float> %44, i32 2
212212
%.i2466 = fmul reassoc nnan nsz arcp contract afn float %.i2465, %43
213213
%.i2469 = fmul reassoc nnan nsz arcp contract afn float %.i2415, %.i2466
@@ -224,7 +224,7 @@ define amdgpu_ps float @_amdgpu_ps_main() #0 {
224224
%.i2488 = fmul reassoc nnan nsz arcp contract afn float %.i2249, %18
225225
%.i2491 = fmul reassoc nnan nsz arcp contract afn float %.i2485, %4
226226
%.i2494 = fadd reassoc nnan nsz arcp contract afn float %.i2479, %.i2491
227-
%51 = call <3 x float> @llvm.amdgcn.image.sample.2d.v3f32.f32(i32 7, float undef, float undef, <8 x i32> undef, <4 x i32> poison, i1 false, i32 0, i32 0)
227+
%51 = call <3 x float> @llvm.amdgcn.image.sample.2d.v3f32.f32(i32 7, float undef, float undef, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)
228228
%.i2515 = extractelement <3 x float> %51, i32 2
229229
%.i2516 = fadd reassoc nnan nsz arcp contract afn float %.i2515, %.i2494
230230
%.i2522 = fadd reassoc nnan nsz arcp contract afn float %.i2521, %.i2516

llvm/test/CodeGen/AMDGPU/else.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if:
4141

4242
else:
4343
%c = fmul float %v, 3.0
44-
%tex = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %c, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
44+
%tex = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %c, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
4545
%v.else = extractelement <4 x float> %tex, i32 0
4646
br label %end
4747

llvm/test/CodeGen/AMDGPU/img-nouse-adjust.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
; GCN: IMAGE_LOAD_V4_V2
1212
define amdgpu_cs void @_amdgpu_cs_main(i32 %dummy) local_unnamed_addr #0 {
1313
.entry:
14-
%unused.result = tail call <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i32(i32 15, i32 undef, i32 undef, <8 x i32> undef, i32 0, i32 0) #3
14+
%unused.result = tail call <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i32(i32 15, i32 undef, i32 undef, <8 x i32> poison, i32 0, i32 0) #3
1515
call void asm sideeffect ";", "" () #0
1616
ret void
1717
}

llvm/test/CodeGen/AMDGPU/insert_vector_elt.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ define <4 x float> @insertelement_to_sgpr() nounwind {
390390
; GCN-NEXT: s_setpc_b64 s[30:31]
391391
%tmp = load <4 x i32>, ptr addrspace(4) undef
392392
%tmp1 = insertelement <4 x i32> %tmp, i32 0, i32 0
393-
%tmp2 = call <4 x float> @llvm.amdgcn.image.gather4.lz.2d.v4f32.f32(i32 1, float undef, float undef, <8 x i32> undef, <4 x i32> %tmp1, i1 0, i32 0, i32 0)
393+
%tmp2 = call <4 x float> @llvm.amdgcn.image.gather4.lz.2d.v4f32.f32(i32 1, float undef, float undef, <8 x i32> poison, <4 x i32> %tmp1, i1 0, i32 0, i32 0)
394394
ret <4 x float> %tmp2
395395
}
396396

llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ps.live.ll

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ define amdgpu_ps float @test2() #0 {
2828
%live = call i1 @llvm.amdgcn.ps.live()
2929
%live.32 = zext i1 %live to i32
3030
%live.32.bc = bitcast i32 %live.32 to float
31-
%t = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %live.32.bc, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
31+
%t = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %live.32.bc, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
3232
%r = extractelement <4 x float> %t, i32 0
3333
ret float %r
3434
}
@@ -51,7 +51,7 @@ dead:
5151
end:
5252
%tc = phi i32 [ %in, %entry ], [ %tc.dead, %dead ]
5353
%tc.bc = bitcast i32 %tc to float
54-
%t = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %tc.bc, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0) #0
54+
%t = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %tc.bc, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0) #0
5555
%r = extractelement <4 x float> %t, i32 0
5656
ret float %r
5757
}

llvm/test/CodeGen/AMDGPU/mixed-wave32-wave64.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ define amdgpu_hs void @_amdgpu_hs_main() #0 {
1313
define amdgpu_ps void @_amdgpu_ps_main(i32 %arg) local_unnamed_addr #1 {
1414
.entry:
1515
%tmp = tail call float @llvm.amdgcn.interp.p2(float undef, float undef, i32 1, i32 0, i32 %arg) #2
16-
%tmp1 = tail call float @llvm.amdgcn.image.sample.2d.f32.f32(i32 1, float undef, float %tmp, <8 x i32> undef, <4 x i32> poison, i1 false, i32 0, i32 0)
16+
%tmp1 = tail call float @llvm.amdgcn.image.sample.2d.f32.f32(i32 1, float undef, float %tmp, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)
1717
%tmp2 = fcmp olt float %tmp1, 5.000000e-01
1818
br i1 %tmp2, label %bb, label %l
1919

llvm/test/CodeGen/AMDGPU/sgpr-copy.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ bb:
383383
%tid = call i32 @llvm.amdgcn.mbcnt.lo(i32 -1, i32 0) #0
384384
%tmp7 = getelementptr [17 x <4 x i32>], ptr addrspace(4) %arg, i32 0, i32 %tid
385385
%tmp8 = load <4 x i32>, ptr addrspace(4) %tmp7, align 16, !tbaa !0
386-
%tmp = call <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 15, float 7.500000e-01, float 2.500000e-01, <8 x i32> undef, <4 x i32> %tmp8, i1 0, i32 0, i32 0)
386+
%tmp = call <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 15, float 7.500000e-01, float 2.500000e-01, <8 x i32> poison, <4 x i32> %tmp8, i1 0, i32 0, i32 0)
387387
%tmp10 = extractelement <4 x float> %tmp, i32 0
388388
%tmp12 = call <2 x half> @llvm.amdgcn.cvt.pkrtz(float %tmp10, float undef)
389389
call void @llvm.amdgcn.exp.compr.v2f16(i32 0, i32 15, <2 x half> %tmp12, <2 x half> undef, i1 true, i1 true) #0

llvm/test/CodeGen/AMDGPU/skip-if-dead.ll

+2-2
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ bb3: ; preds = %bb
15321532
br label %bb4
15331533

15341534
bb4: ; preds = %bb3, %bb
1535-
%tmp5 = call <4 x float> @llvm.amdgcn.image.sample.c.1d.v4f32.f32(i32 16, float %arg2, float %arg3, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
1535+
%tmp5 = call <4 x float> @llvm.amdgcn.image.sample.c.1d.v4f32.f32(i32 16, float %arg2, float %arg3, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
15361536
%tmp6 = extractelement <4 x float> %tmp5, i32 0
15371537
%tmp7 = fcmp une float %tmp6, 0.000000e+00
15381538
br i1 %tmp7, label %bb8, label %bb9
@@ -1677,7 +1677,7 @@ define amdgpu_ps void @cbranch_kill(i32 inreg %0, float %val0, float %val1) {
16771677
; GFX11-NEXT: exp mrt0 off, off, off, off done
16781678
; GFX11-NEXT: s_endpgm
16791679
.entry:
1680-
%sample = call float @llvm.amdgcn.image.sample.l.2darray.f32.f32(i32 1, float %val1, float %val1, float %val1, float 0.000000e+00, <8 x i32> undef, <4 x i32> poison, i1 false, i32 0, i32 0)
1680+
%sample = call float @llvm.amdgcn.image.sample.l.2darray.f32.f32(i32 1, float %val1, float %val1, float %val1, float 0.000000e+00, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)
16811681
%cond0 = fcmp ugt float %sample, 0.000000e+00
16821682
br i1 %cond0, label %live, label %kill
16831683

llvm/test/CodeGen/AMDGPU/subreg-coalescer-crash.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ bb7: ; preds = %bb6
6565
br label %bb4
6666

6767
bb9: ; preds = %bb2
68-
%tmp10 = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float undef, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
68+
%tmp10 = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float undef, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
6969
%tmp11 = extractelement <4 x float> %tmp10, i32 1
7070
%tmp12 = extractelement <4 x float> %tmp10, i32 3
7171
br label %bb14

llvm/test/CodeGen/AMDGPU/undefined-subreg-liverange.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ bb:
7171
%tmp1 = load volatile i32, ptr addrspace(1) poison, align 4
7272
%tmp2 = insertelement <4 x i32> poison, i32 %tmp1, i32 0
7373
%tmp3 = bitcast i32 %tmp1 to float
74-
%tmp4 = call <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 15, float %tmp3, float %tmp3, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
74+
%tmp4 = call <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 15, float %tmp3, float %tmp3, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
7575
%tmp5 = extractelement <4 x float> %tmp4, i32 0
7676
%tmp6 = fmul float %tmp5, undef
7777
%tmp7 = fadd float %tmp6, %tmp6

llvm/test/CodeGen/AMDGPU/unigine-liveness-crash.ll

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ main_body:
1717
%j.f.i = bitcast i32 %j.i to float
1818
%p1.i = call float @llvm.amdgcn.interp.p1(float %i.f.i, i32 3, i32 4, i32 %arg6) #2
1919
%p2.i = call float @llvm.amdgcn.interp.p2(float %p1.i, float %j.f.i, i32 3, i32 4, i32 %arg6) #2
20-
%tmp23 = call <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 15, float undef, float undef, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
20+
%tmp23 = call <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 15, float undef, float undef, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
2121

2222
%tmp24 = extractelement <4 x float> %tmp23, i32 3
2323
%tmp25 = fmul float %tmp24, %tmp24
2424
%tmp26 = fmul float %p2.i, %p2.i
2525
%tmp27 = fadd float %tmp26, %tmp26
26-
%tmp32 = call <4 x float> @llvm.amdgcn.image.sample.c.2d.v4f32.f32(i32 15, float %tmp27, float 0.0, float undef, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
26+
%tmp32 = call <4 x float> @llvm.amdgcn.image.sample.c.2d.v4f32.f32(i32 15, float %tmp27, float 0.0, float undef, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
2727
%tmp33 = extractelement <4 x float> %tmp32, i32 0
2828
%tmp34 = fadd float %tmp33, %tmp33
2929
%tmp35 = fadd float %tmp34, %tmp34
3030
%tmp36 = fadd float %tmp35, %tmp35
3131
%tmp37 = fadd float %tmp36, %tmp36
3232
%tmp38 = fadd float %tmp37, %tmp37
33-
%tmp39 = call <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 15, float undef, float undef, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
33+
%tmp39 = call <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 15, float undef, float undef, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
3434
%tmp40 = extractelement <4 x float> %tmp39, i32 0
3535
%tmp41 = extractelement <4 x float> %tmp39, i32 1
3636
%tmp42 = extractelement <4 x float> %tmp39, i32 2
@@ -48,12 +48,12 @@ main_body:
4848
%tmp54 = insertelement <4 x i32> %tmp53, i32 %tmp51, i32 1
4949
%tmp55 = insertelement <4 x i32> %tmp54, i32 %tmp52, i32 2
5050
%tmp55.cast = bitcast <4 x i32> %tmp55 to <4 x float>
51-
%tmp56 = call <4 x float> @llvm.amdgcn.image.sample.c.2d.v4f32.f32(i32 15, float %tmp27, float %tmp48, float %tmp49, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
51+
%tmp56 = call <4 x float> @llvm.amdgcn.image.sample.c.2d.v4f32.f32(i32 15, float %tmp27, float %tmp48, float %tmp49, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
5252
%tmp57 = extractelement <4 x float> %tmp56, i32 0
5353
%tmp58 = fadd float %tmp38, %tmp57
5454
%tmp59 = fadd float %tmp46, %tmp46
5555
%tmp60 = fadd float %tmp47, %tmp47
56-
%tmp65 = call <4 x float> @llvm.amdgcn.image.sample.c.2d.v4f32.f32(i32 15, float undef, float %tmp59, float %tmp60, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
56+
%tmp65 = call <4 x float> @llvm.amdgcn.image.sample.c.2d.v4f32.f32(i32 15, float undef, float %tmp59, float %tmp60, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
5757
%tmp66 = extractelement <4 x float> %tmp65, i32 0
5858
%tmp67 = fadd float %tmp58, %tmp66
5959
%tmp68 = fmul float %tmp67, 1.250000e-01
@@ -91,7 +91,7 @@ IF29: ; preds = %LOOP
9191
br label %ENDIF25
9292

9393
ENDIF28: ; preds = %LOOP
94-
%tmp87 = call <4 x float> @llvm.amdgcn.image.sample.c.2d.v4f32.f32(i32 15, float %tmp27, float undef, float undef, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
94+
%tmp87 = call <4 x float> @llvm.amdgcn.image.sample.c.2d.v4f32.f32(i32 15, float %tmp27, float undef, float undef, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
9595
%tmp88 = extractelement <4 x float> %tmp87, i32 0
9696
%tmp89 = fadd float %tmp88, %tmp88
9797
br label %LOOP

llvm/test/CodeGen/AMDGPU/vgpr-tuple-allocation.ll

+3-3
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ main_body:
188188
call void asm sideeffect "", "~{v8},~{v9},~{v10},~{v11},~{v12},~{v13},~{v14},~{v15}"() #0
189189
call void asm sideeffect "", "~{v16},~{v17},~{v18},~{v19},~{v20},~{v21},~{v22},~{v23}"() #0
190190
call void asm sideeffect "", "~{v24},~{v25},~{v26},~{v27},~{v28},~{v29},~{v30},~{v31}"() #0
191-
%v = call <4 x float> @llvm.amdgcn.image.gather4.c.b.cl.2d.v4f32.f32.f32(i32 1, float %bias, float %zcompare, float %s, float %t, float %clamp, <8 x i32> undef, <4 x i32> poison, i1 false, i32 0, i32 0)
191+
%v = call <4 x float> @llvm.amdgcn.image.gather4.c.b.cl.2d.v4f32.f32.f32(i32 1, float %bias, float %zcompare, float %s, float %t, float %clamp, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)
192192
call void @extern_func()
193193
ret <4 x float> %v
194194
}
@@ -353,10 +353,10 @@ define <4 x float> @call_preserved_vgpr_tuple8(<8 x i32> %rsrc, <4 x i32> %samp,
353353

354354

355355
main_body:
356-
%v = call <4 x float> @llvm.amdgcn.image.gather4.c.b.cl.2d.v4f32.f32.f32(i32 1, float %bias, float %zcompare, float %s, float %t, float %clamp, <8 x i32> undef, <4 x i32> poison, i1 false, i32 0, i32 0)
356+
%v = call <4 x float> @llvm.amdgcn.image.gather4.c.b.cl.2d.v4f32.f32.f32(i32 1, float %bias, float %zcompare, float %s, float %t, float %clamp, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)
357357
store <4 x float> %v, ptr addrspace(1) poison
358358
call void @extern_func()
359-
%v1 = call <4 x float> @llvm.amdgcn.image.gather4.c.b.cl.2d.v4f32.f32.f32(i32 1, float %bias, float %zcompare, float %s, float %t, float %clamp, <8 x i32> undef, <4 x i32> poison, i1 false, i32 0, i32 0)
359+
%v1 = call <4 x float> @llvm.amdgcn.image.gather4.c.b.cl.2d.v4f32.f32.f32(i32 1, float %bias, float %zcompare, float %s, float %t, float %clamp, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)
360360
ret <4 x float> %v1
361361
}
362362

llvm/test/CodeGen/AMDGPU/wave32.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ loop:
18751875

18761876
body:
18771877
%c.iv0 = extractelement <4 x float> %c.iv, i32 0
1878-
%c.next = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %c.iv0, <8 x i32> undef, <4 x i32> poison, i1 0, i32 0, i32 0)
1878+
%c.next = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %c.iv0, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)
18791879
%ctr.next = fadd float %ctr.iv, 2.0
18801880
br label %loop
18811881

0 commit comments

Comments
 (0)