Skip to content

Commit f613bc5

Browse files
authored
AMDGPU: Replace half undef uses with poison in tests (#131083)
1 parent b910610 commit f613bc5

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

llvm/test/CodeGen/AMDGPU/GlobalISel/clamp-minmax-const-combine.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ define <2 x half> @test_min_max_splat_padded_with_undef(<2 x half> %a) #2 {
108108
; GFX12-NEXT: v_pk_mul_f16 v0, v0, 2.0 op_sel_hi:[1,0] clamp
109109
; GFX12-NEXT: s_setpc_b64 s[30:31]
110110
%fmul = fmul <2 x half> %a, <half 2.0, half 2.0>
111-
%maxnum = call <2 x half> @llvm.maxnum.v2f16(<2 x half> <half 0.0, half undef>, <2 x half> %fmul)
112-
%fmed = call <2 x half> @llvm.minnum.v2f16(<2 x half> <half 1.0, half undef>, <2 x half> %maxnum)
111+
%maxnum = call <2 x half> @llvm.maxnum.v2f16(<2 x half> <half 0.0, half poison>, <2 x half> %fmul)
112+
%fmed = call <2 x half> @llvm.minnum.v2f16(<2 x half> <half 1.0, half poison>, <2 x half> %maxnum)
113113
ret <2 x half> %fmed
114114
}
115115

@@ -199,8 +199,8 @@ define <2 x half> @test_max_K0min_K1Val_v2f16(<2 x half> %a) #1 {
199199
; GFX12-NEXT: v_pk_mul_f16 v0, v0, 2.0 op_sel_hi:[1,0] clamp
200200
; GFX12-NEXT: s_setpc_b64 s[30:31]
201201
%fmul = fmul <2 x half> %a, <half 2.0, half 2.0>
202-
%minnum = call nnan <2 x half> @llvm.minnum.v2f16(<2 x half> <half 1.0, half undef>, <2 x half> %fmul)
203-
%fmed = call nnan <2 x half> @llvm.maxnum.v2f16(<2 x half> <half undef, half 0.0>, <2 x half> %minnum)
202+
%minnum = call nnan <2 x half> @llvm.minnum.v2f16(<2 x half> <half 1.0, half poison>, <2 x half> %fmul)
203+
%fmed = call nnan <2 x half> @llvm.maxnum.v2f16(<2 x half> <half poison, half 0.0>, <2 x half> %minnum)
204204
ret <2 x half> %fmed
205205
}
206206

llvm/test/CodeGen/AMDGPU/clamp.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3066,8 +3066,8 @@ define amdgpu_kernel void @v_clamp_v2f16_undef_elt(ptr addrspace(1) %out, ptr ad
30663066
%gep0 = getelementptr <2 x half>, ptr addrspace(1) %aptr, i32 %tid
30673067
%out.gep = getelementptr <2 x half>, ptr addrspace(1) %out, i32 %tid
30683068
%a = load <2 x half>, ptr addrspace(1) %gep0
3069-
%max = call <2 x half> @llvm.maxnum.v2f16(<2 x half> %a, <2 x half> <half undef, half 0.0>)
3070-
%med = call <2 x half> @llvm.minnum.v2f16(<2 x half> %max, <2 x half> <half 1.0, half undef>)
3069+
%max = call <2 x half> @llvm.maxnum.v2f16(<2 x half> %a, <2 x half> <half poison, half 0.0>)
3070+
%med = call <2 x half> @llvm.minnum.v2f16(<2 x half> %max, <2 x half> <half 1.0, half poison>)
30713071

30723072
store <2 x half> %med, ptr addrspace(1) %out.gep
30733073
ret void
@@ -3827,8 +3827,8 @@ define amdgpu_kernel void @v_clamp_v2f16_undef_limit_elts0(ptr addrspace(1) %out
38273827
%gep0 = getelementptr <2 x half>, ptr addrspace(1) %aptr, i32 %tid
38283828
%out.gep = getelementptr <2 x half>, ptr addrspace(1) %out, i32 %tid
38293829
%a = load <2 x half>, ptr addrspace(1) %gep0
3830-
%max = call <2 x half> @llvm.maxnum.v2f16(<2 x half> %a, <2 x half> <half 0.0, half undef>)
3831-
%med = call <2 x half> @llvm.minnum.v2f16(<2 x half> %max, <2 x half> <half undef, half 1.0>)
3830+
%max = call <2 x half> @llvm.maxnum.v2f16(<2 x half> %a, <2 x half> <half 0.0, half poison>)
3831+
%med = call <2 x half> @llvm.minnum.v2f16(<2 x half> %max, <2 x half> <half poison, half 1.0>)
38323832

38333833
store <2 x half> %med, ptr addrspace(1) %out.gep
38343834
ret void
@@ -3925,8 +3925,8 @@ define amdgpu_kernel void @v_clamp_v2f16_undef_limit_elts1(ptr addrspace(1) %out
39253925
%gep0 = getelementptr <2 x half>, ptr addrspace(1) %aptr, i32 %tid
39263926
%out.gep = getelementptr <2 x half>, ptr addrspace(1) %out, i32 %tid
39273927
%a = load <2 x half>, ptr addrspace(1) %gep0
3928-
%max = call <2 x half> @llvm.maxnum.v2f16(<2 x half> %a, <2 x half> <half undef, half 0.0>)
3929-
%med = call <2 x half> @llvm.minnum.v2f16(<2 x half> %max, <2 x half> <half 1.0, half undef>)
3928+
%max = call <2 x half> @llvm.maxnum.v2f16(<2 x half> %a, <2 x half> <half poison, half 0.0>)
3929+
%med = call <2 x half> @llvm.minnum.v2f16(<2 x half> %max, <2 x half> <half 1.0, half poison>)
39303930

39313931
store <2 x half> %med, ptr addrspace(1) %out.gep
39323932
ret void

llvm/test/CodeGen/AMDGPU/inline-constraints.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ define i32 @inline_A_constraint_V2() {
301301

302302
; NOGCN: error: invalid operand for inline asm constraint 'A'
303303
define i32 @inline_A_constraint_V3() {
304-
%v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x half> <half undef, half -0.5>)
304+
%v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x half> <half poison, half -0.5>)
305305
ret i32 %v0
306306
}
307307

0 commit comments

Comments
 (0)