@@ -3272,9 +3272,10 @@ define double @v_fmaximum3_f64_fabs0(double %a, double %b, double %c) {
32723272; GFX9-LABEL: v_fmaximum3_f64_fabs0:
32733273; GFX9: ; %bb.0:
32743274; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3275- ; GFX9-NEXT: v_max_f64 v[6:7], |v[0:1]|, v[2:3]
3275+ ; GFX9-NEXT: v_and_b32_e32 v1, 0x7fffffff, v1
3276+ ; GFX9-NEXT: v_max_f64 v[6:7], v[0:1], v[2:3]
32763277; GFX9-NEXT: v_mov_b32_e32 v8, 0x7ff80000
3277- ; GFX9-NEXT: v_cmp_u_f64_e64 vcc, | v[0:1]| , v[2:3]
3278+ ; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[2:3]
32783279; GFX9-NEXT: s_nop 1
32793280; GFX9-NEXT: v_cndmask_b32_e32 v1, v7, v8, vcc
32803281; GFX9-NEXT: v_cndmask_b32_e64 v0, v6, 0, vcc
@@ -3306,9 +3307,10 @@ define double @v_fmaximum3_f64_fabs1(double %a, double %b, double %c) {
33063307; GFX9-LABEL: v_fmaximum3_f64_fabs1:
33073308; GFX9: ; %bb.0:
33083309; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3309- ; GFX9-NEXT: v_max_f64 v[6:7], v[0:1], |v[2:3]|
3310+ ; GFX9-NEXT: v_and_b32_e32 v3, 0x7fffffff, v3
3311+ ; GFX9-NEXT: v_max_f64 v[6:7], v[0:1], v[2:3]
33103312; GFX9-NEXT: v_mov_b32_e32 v8, 0x7ff80000
3311- ; GFX9-NEXT: v_cmp_u_f64_e64 vcc, v[0:1], | v[2:3]|
3313+ ; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[2:3]
33123314; GFX9-NEXT: s_nop 1
33133315; GFX9-NEXT: v_cndmask_b32_e32 v1, v7, v8, vcc
33143316; GFX9-NEXT: v_cndmask_b32_e64 v0, v6, 0, vcc
@@ -3343,11 +3345,12 @@ define double @v_fmaximum3_f64_fabs2(double %a, double %b, double %c) {
33433345; GFX9-NEXT: v_max_f64 v[6:7], v[0:1], v[2:3]
33443346; GFX9-NEXT: v_mov_b32_e32 v8, 0x7ff80000
33453347; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[2:3]
3346- ; GFX9-NEXT: s_nop 1
3348+ ; GFX9-NEXT: v_and_b32_e32 v5, 0x7fffffff, v5
3349+ ; GFX9-NEXT: s_nop 0
33473350; GFX9-NEXT: v_cndmask_b32_e32 v1, v7, v8, vcc
33483351; GFX9-NEXT: v_cndmask_b32_e64 v0, v6, 0, vcc
3349- ; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], | v[4:5]|
3350- ; GFX9-NEXT: v_cmp_u_f64_e64 vcc, v[0:1], | v[4:5]|
3352+ ; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], v[4:5]
3353+ ; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[4:5]
33513354; GFX9-NEXT: s_nop 1
33523355; GFX9-NEXT: v_cndmask_b32_e64 v0, v2, 0, vcc
33533356; GFX9-NEXT: v_cndmask_b32_e32 v1, v3, v8, vcc
@@ -3374,14 +3377,17 @@ define double @v_fmaximum3_f64_fabs_all(double %a, double %b, double %c) {
33743377; GFX9-LABEL: v_fmaximum3_f64_fabs_all:
33753378; GFX9: ; %bb.0:
33763379; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3377- ; GFX9-NEXT: v_max_f64 v[6:7], |v[0:1]|, |v[2:3]|
3380+ ; GFX9-NEXT: v_and_b32_e32 v1, 0x7fffffff, v1
3381+ ; GFX9-NEXT: v_and_b32_e32 v3, 0x7fffffff, v3
3382+ ; GFX9-NEXT: v_max_f64 v[6:7], v[0:1], v[2:3]
33783383; GFX9-NEXT: v_mov_b32_e32 v8, 0x7ff80000
3379- ; GFX9-NEXT: v_cmp_u_f64_e64 vcc, |v[0:1]|, |v[2:3]|
3380- ; GFX9-NEXT: s_nop 1
3384+ ; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[2:3]
3385+ ; GFX9-NEXT: v_and_b32_e32 v5, 0x7fffffff, v5
3386+ ; GFX9-NEXT: s_nop 0
33813387; GFX9-NEXT: v_cndmask_b32_e32 v1, v7, v8, vcc
33823388; GFX9-NEXT: v_cndmask_b32_e64 v0, v6, 0, vcc
3383- ; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], | v[4:5]|
3384- ; GFX9-NEXT: v_cmp_u_f64_e64 vcc, v[0:1], | v[4:5]|
3389+ ; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], v[4:5]
3390+ ; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[4:5]
33853391; GFX9-NEXT: s_nop 1
33863392; GFX9-NEXT: v_cndmask_b32_e64 v0, v2, 0, vcc
33873393; GFX9-NEXT: v_cndmask_b32_e32 v1, v3, v8, vcc
@@ -3446,14 +3452,17 @@ define double @v_fmaximum3_f64_fneg_fabs_all(double %a, double %b, double %c) {
34463452; GFX9-LABEL: v_fmaximum3_f64_fneg_fabs_all:
34473453; GFX9: ; %bb.0:
34483454; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3449- ; GFX9-NEXT: v_max_f64 v[6:7], -|v[0:1]|, -|v[2:3]|
3455+ ; GFX9-NEXT: v_and_b32_e32 v1, 0x7fffffff, v1
3456+ ; GFX9-NEXT: v_and_b32_e32 v3, 0x7fffffff, v3
3457+ ; GFX9-NEXT: v_max_f64 v[6:7], -v[0:1], -v[2:3]
34503458; GFX9-NEXT: v_mov_b32_e32 v8, 0x7ff80000
3451- ; GFX9-NEXT: v_cmp_u_f64_e64 vcc, -|v[0:1]|, -|v[2:3]|
3452- ; GFX9-NEXT: s_nop 1
3459+ ; GFX9-NEXT: v_cmp_u_f64_e64 vcc, -v[0:1], -v[2:3]
3460+ ; GFX9-NEXT: v_and_b32_e32 v5, 0x7fffffff, v5
3461+ ; GFX9-NEXT: s_nop 0
34533462; GFX9-NEXT: v_cndmask_b32_e32 v1, v7, v8, vcc
34543463; GFX9-NEXT: v_cndmask_b32_e64 v0, v6, 0, vcc
3455- ; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], -| v[4:5]|
3456- ; GFX9-NEXT: v_cmp_u_f64_e64 vcc, v[0:1], -| v[4:5]|
3464+ ; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], -v[4:5]
3465+ ; GFX9-NEXT: v_cmp_u_f64_e64 vcc, v[0:1], -v[4:5]
34573466; GFX9-NEXT: s_nop 1
34583467; GFX9-NEXT: v_cndmask_b32_e64 v0, v2, 0, vcc
34593468; GFX9-NEXT: v_cndmask_b32_e32 v1, v3, v8, vcc
0 commit comments