Skip to content

Commit 7b1b750

Browse files
committed
Fix AMDGPU tests
Re-generate 2 AMDGPU tests that are failing after rebasing this change: - llvm/test/CodeGen/AMDGPU/fneg-combines.new.ll - llvm/test/Transforms/InstCombine/AMDGPU/fmed3.ll
1 parent 97fa626 commit 7b1b750

File tree

2 files changed

+13
-30
lines changed

2 files changed

+13
-30
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,7 +2066,7 @@ define float @v_fneg_self_minimumnum_f32_no_ieee(float %a) #4 {
20662066
; GCN-LABEL: v_fneg_self_minimumnum_f32_no_ieee:
20672067
; GCN: ; %bb.0:
20682068
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2069-
; GCN-NEXT: v_max_f32_e64 v0, -v0, -v0
2069+
; GCN-NEXT: v_xor_b32_e32 v0, 0x80000000, v0
20702070
; GCN-NEXT: s_setpc_b64 s[30:31]
20712071
%min = call float @llvm.minimumnum.f32(float %a, float %a)
20722072
%min.fneg = fneg float %min
@@ -2401,7 +2401,7 @@ define float @v_fneg_self_maximumnum_f32_no_ieee(float %a) #4 {
24012401
; GCN-LABEL: v_fneg_self_maximumnum_f32_no_ieee:
24022402
; GCN: ; %bb.0:
24032403
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2404-
; GCN-NEXT: v_min_f32_e64 v0, -v0, -v0
2404+
; GCN-NEXT: v_xor_b32_e32 v0, 0x80000000, v0
24052405
; GCN-NEXT: s_setpc_b64 s[30:31]
24062406
%max = call float @llvm.maximumnum.f32(float %a, float %a)
24072407
%max.fneg = fneg float %max

llvm/test/Transforms/InstCombine/AMDGPU/fmed3.ll

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -269,42 +269,27 @@ define float @fmed3_constant_src2_1_f32(float %x, float %y) #1 {
269269
}
270270

271271
define float @fmed3_x_qnan0_qnan1_f32(float %x) #1 {
272-
; IEEE1-LABEL: define float @fmed3_x_qnan0_qnan1_f32(
273-
; IEEE1-SAME: float [[X:%.*]]) #[[ATTR1]] {
274-
; IEEE1-NEXT: ret float [[X]]
275-
;
276-
; IEEE0-LABEL: define float @fmed3_x_qnan0_qnan1_f32(
277-
; IEEE0-SAME: float [[X:%.*]]) #[[ATTR1]] {
278-
; IEEE0-NEXT: [[MED3:%.*]] = call float @llvm.minimumnum.f32(float [[X]], float 0x7FF8002000000000)
279-
; IEEE0-NEXT: ret float [[MED3]]
272+
; CHECK-LABEL: define float @fmed3_x_qnan0_qnan1_f32(
273+
; CHECK-SAME: float [[X:%.*]]) #[[ATTR1]] {
274+
; CHECK-NEXT: ret float [[X]]
280275
;
281276
%med3 = call float @llvm.amdgcn.fmed3.f32(float %x, float 0x7FF8001000000000, float 0x7FF8002000000000)
282277
ret float %med3
283278
}
284279

285280
define float @fmed3_qnan0_x_qnan1_f32(float %x) #1 {
286-
; IEEE1-LABEL: define float @fmed3_qnan0_x_qnan1_f32(
287-
; IEEE1-SAME: float [[X:%.*]]) #[[ATTR1]] {
288-
; IEEE1-NEXT: ret float [[X]]
289-
;
290-
; IEEE0-LABEL: define float @fmed3_qnan0_x_qnan1_f32(
291-
; IEEE0-SAME: float [[X:%.*]]) #[[ATTR1]] {
292-
; IEEE0-NEXT: [[MED3:%.*]] = call float @llvm.minimumnum.f32(float [[X]], float 0x7FF8002000000000)
293-
; IEEE0-NEXT: ret float [[MED3]]
281+
; CHECK-LABEL: define float @fmed3_qnan0_x_qnan1_f32(
282+
; CHECK-SAME: float [[X:%.*]]) #[[ATTR1]] {
283+
; CHECK-NEXT: ret float [[X]]
294284
;
295285
%med3 = call float @llvm.amdgcn.fmed3.f32(float 0x7FF8001000000000, float %x, float 0x7FF8002000000000)
296286
ret float %med3
297287
}
298288

299289
define float @fmed3_qnan0_qnan1_x_f32(float %x) #1 {
300-
; IEEE1-LABEL: define float @fmed3_qnan0_qnan1_x_f32(
301-
; IEEE1-SAME: float [[X:%.*]]) #[[ATTR1]] {
302-
; IEEE1-NEXT: ret float [[X]]
303-
;
304-
; IEEE0-LABEL: define float @fmed3_qnan0_qnan1_x_f32(
305-
; IEEE0-SAME: float [[X:%.*]]) #[[ATTR1]] {
306-
; IEEE0-NEXT: [[MED3:%.*]] = call float @llvm.minimumnum.f32(float [[X]], float 0x7FF8002000000000)
307-
; IEEE0-NEXT: ret float [[MED3]]
290+
; CHECK-LABEL: define float @fmed3_qnan0_qnan1_x_f32(
291+
; CHECK-SAME: float [[X:%.*]]) #[[ATTR1]] {
292+
; CHECK-NEXT: ret float [[X]]
308293
;
309294
%med3 = call float @llvm.amdgcn.fmed3.f32(float 0x7FF8001000000000, float 0x7FF8002000000000, float %x)
310295
ret float %med3
@@ -448,8 +433,7 @@ define float @fmed3_snan1_x_snan2_f32(float %x) #1 {
448433
;
449434
; IEEE0-LABEL: define float @fmed3_snan1_x_snan2_f32(
450435
; IEEE0-SAME: float [[X:%.*]]) #[[ATTR1]] {
451-
; IEEE0-NEXT: [[MED3:%.*]] = call float @llvm.minimumnum.f32(float [[X]], float 0x7FF0000040000000)
452-
; IEEE0-NEXT: ret float [[MED3]]
436+
; IEEE0-NEXT: ret float [[X]]
453437
;
454438
%med3 = call float @llvm.amdgcn.fmed3.f32(float 0x7FF0000020000000, float %x, float 0x7FF0000040000000)
455439
ret float %med3
@@ -462,8 +446,7 @@ define float @fmed3_x_snan1_snan2_f32(float %x) #1 {
462446
;
463447
; IEEE0-LABEL: define float @fmed3_x_snan1_snan2_f32(
464448
; IEEE0-SAME: float [[X:%.*]]) #[[ATTR1]] {
465-
; IEEE0-NEXT: [[MED3:%.*]] = call float @llvm.minimumnum.f32(float [[X]], float 0x7FF0000040000000)
466-
; IEEE0-NEXT: ret float [[MED3]]
449+
; IEEE0-NEXT: ret float [[X]]
467450
;
468451
%med3 = call float @llvm.amdgcn.fmed3.f32(float %x, float 0x7FF0000020000000, float 0x7FF0000040000000)
469452
ret float %med3

0 commit comments

Comments
 (0)