Skip to content

Commit 65c4e84

Browse files
committed
Update failing AMDGPU tests
Update some failing AMDGPU tests using maxnum's updated sNaN behaviour and maximumnum's new set of optimizations.
1 parent aa652bf commit 65c4e84

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

llvm/test/CodeGen/AMDGPU/fcanonicalize-elimination.ll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,12 +497,10 @@ define amdgpu_kernel void @test_fold_canonicalize_minnum_value_f32(ptr addrspace
497497
ret void
498498
}
499499

500-
; FIXME: Should there be more checks here? minnum with NaN operand is simplified away.
500+
; FIXME: Should there be more checks here? minnum with sNaN operand is simplified to qNaN.
501501

502502
; GCN-LABEL: test_fold_canonicalize_sNaN_value_f32:
503-
; GCN: {{flat|global}}_load_dword [[LOAD:v[0-9]+]]
504-
; VI: v_mul_f32_e32 v{{[0-9]+}}, 1.0, [[LOAD]]
505-
; GFX9: v_max_f32_e32 v{{[0-9]+}}, [[LOAD]], [[LOAD]]
503+
; GCN: v_mov_b32_e32 v{{.+}}, 0x7fc00000
506504
define amdgpu_kernel void @test_fold_canonicalize_sNaN_value_f32(ptr addrspace(1) %arg) {
507505
%id = tail call i32 @llvm.amdgcn.workitem.id.x()
508506
%gep = getelementptr inbounds float, ptr addrspace(1) %arg, i32 %id

llvm/test/CodeGen/AMDGPU/fneg-combines.new.ll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,8 +2055,7 @@ define float @v_fneg_self_minimumnum_f32_ieee(float %a) #0 {
20552055
; GCN-LABEL: v_fneg_self_minimumnum_f32_ieee:
20562056
; GCN: ; %bb.0:
20572057
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2058-
; GCN-NEXT: v_mul_f32_e32 v0, -1.0, v0
2059-
; GCN-NEXT: v_max_f32_e32 v0, v0, v0
2058+
; GCN-NEXT: v_xor_b32_e32 v0, 0x80000000, v0
20602059
; GCN-NEXT: s_setpc_b64 s[30:31]
20612060
%min = call float @llvm.minimumnum.f32(float %a, float %a)
20622061
%min.fneg = fneg float %min
@@ -2391,8 +2390,7 @@ define float @v_fneg_self_maximumnum_f32_ieee(float %a) #0 {
23912390
; GCN-LABEL: v_fneg_self_maximumnum_f32_ieee:
23922391
; GCN: ; %bb.0:
23932392
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2394-
; GCN-NEXT: v_mul_f32_e32 v0, -1.0, v0
2395-
; GCN-NEXT: v_min_f32_e32 v0, v0, v0
2393+
; GCN-NEXT: v_xor_b32_e32 v0, 0x80000000, v0
23962394
; GCN-NEXT: s_setpc_b64 s[30:31]
23972395
%max = call float @llvm.maximumnum.f32(float %a, float %a)
23982396
%max.fneg = fneg float %max

0 commit comments

Comments
 (0)