Skip to content

Commit

Permalink
AMDGPU: Handle f32 minimum3/maximum3 pattern for gfx950 (#117737)
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenm authored Nov 26, 2024
1 parent e57b327 commit f5e92eb
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 193 deletions.
3 changes: 2 additions & 1 deletion llvm/lib/Target/AMDGPU/SIISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13346,7 +13346,8 @@ static bool supportsMin3Max3(const GCNSubtarget &Subtarget, unsigned Opc,
return (VT == MVT::f32) || (VT == MVT::f16 && Subtarget.hasMin3Max3_16());
case ISD::FMINIMUM:
case ISD::FMAXIMUM:
return (VT == MVT::f32 || VT == MVT::f16) && Subtarget.hasIEEEMinMax3();
return (VT == MVT::f32 && Subtarget.hasMinimum3Maximum3F32()) ||
(VT == MVT::f16 && Subtarget.hasMinimum3Maximum3F16());
case ISD::SMAX:
case ISD::SMIN:
case ISD::UMAX:
Expand Down
146 changes: 50 additions & 96 deletions llvm/test/CodeGen/AMDGPU/fmaximum3.ll
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ define float @v_fmaximum3_f32(float %a, float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, v1
; GFX950-NEXT: v_maximum3_f32 v0, v0, v2, v2
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, v2
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call float @llvm.maximum.f32(float %a, float %b)
%max1 = call float @llvm.maximum.f32(float %max0, float %c)
Expand Down Expand Up @@ -67,8 +66,7 @@ define float @v_fmaximum3_f32_commute(float %a, float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32_commute:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, v1
; GFX950-NEXT: v_maximum3_f32 v0, v2, v0, v0
; GFX950-NEXT: v_maximum3_f32 v0, v2, v0, v1
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call float @llvm.maximum.f32(float %a, float %b)
%max1 = call float @llvm.maximum.f32(float %c, float %max0)
Expand Down Expand Up @@ -102,9 +100,9 @@ define amdgpu_ps i32 @s_fmaximum3_f32(float inreg %a, float inreg %b, float inre
;
; GFX950-LABEL: s_fmaximum3_f32:
; GFX950: ; %bb.0:
; GFX950-NEXT: v_mov_b32_e32 v0, s0
; GFX950-NEXT: v_maximum3_f32 v0, v0, s1, s1
; GFX950-NEXT: v_maximum3_f32 v0, v0, s2, s2
; GFX950-NEXT: v_mov_b32_e32 v0, s1
; GFX950-NEXT: v_mov_b32_e32 v1, s2
; GFX950-NEXT: v_maximum3_f32 v0, s0, v0, v1
; GFX950-NEXT: s_nop 0
; GFX950-NEXT: v_readfirstlane_b32 s0, v0
; GFX950-NEXT: ; return to shader part epilog
Expand Down Expand Up @@ -143,8 +141,7 @@ define float @v_fmaximum3_f32_fabs0(float %a, float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32_fabs0:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, |v0|, v1, v1
; GFX950-NEXT: v_maximum3_f32 v0, v0, v2, v2
; GFX950-NEXT: v_maximum3_f32 v0, |v0|, v1, v2
; GFX950-NEXT: s_setpc_b64 s[30:31]
%a.fabs = call float @llvm.fabs.f32(float %a)
%max0 = call float @llvm.maximum.f32(float %a.fabs, float %b)
Expand Down Expand Up @@ -180,8 +177,7 @@ define float @v_fmaximum3_f32_fabs1(float %a, float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32_fabs1:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, v0, |v1|, |v1|
; GFX950-NEXT: v_maximum3_f32 v0, v0, v2, v2
; GFX950-NEXT: v_maximum3_f32 v0, v0, |v1|, v2
; GFX950-NEXT: s_setpc_b64 s[30:31]
%b.fabs = call float @llvm.fabs.f32(float %b)
%max0 = call float @llvm.maximum.f32(float %a, float %b.fabs)
Expand Down Expand Up @@ -217,8 +213,7 @@ define float @v_fmaximum3_f32_fabs2(float %a, float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32_fabs2:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, v1
; GFX950-NEXT: v_maximum3_f32 v0, v0, |v2|, |v2|
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, |v2|
; GFX950-NEXT: s_setpc_b64 s[30:31]
%c.fabs = call float @llvm.fabs.f32(float %c)
%max0 = call float @llvm.maximum.f32(float %a, float %b)
Expand Down Expand Up @@ -254,8 +249,7 @@ define float @v_fmaximum3_f32_fabs_all(float %a, float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32_fabs_all:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, |v0|, |v1|, |v1|
; GFX950-NEXT: v_maximum3_f32 v0, v0, |v2|, |v2|
; GFX950-NEXT: v_maximum3_f32 v0, |v0|, |v1|, |v2|
; GFX950-NEXT: s_setpc_b64 s[30:31]
%a.fabs = call float @llvm.fabs.f32(float %a)
%b.fabs = call float @llvm.fabs.f32(float %b)
Expand Down Expand Up @@ -293,8 +287,7 @@ define float @v_fmaximum3_f32_fneg_all(float %a, float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32_fneg_all:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, -v0, -v1, -v1
; GFX950-NEXT: v_maximum3_f32 v0, v0, -v2, -v2
; GFX950-NEXT: v_maximum3_f32 v0, -v0, -v1, -v2
; GFX950-NEXT: s_setpc_b64 s[30:31]
%a.fneg = fneg float %a
%b.fneg = fneg float %b
Expand Down Expand Up @@ -332,8 +325,7 @@ define float @v_fmaximum3_f32_fneg_fabs_all(float %a, float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32_fneg_fabs_all:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, -|v0|, -|v1|, -|v1|
; GFX950-NEXT: v_maximum3_f32 v0, v0, -|v2|, -|v2|
; GFX950-NEXT: v_maximum3_f32 v0, -|v0|, -|v1|, -|v2|
; GFX950-NEXT: s_setpc_b64 s[30:31]
%a.fabs = call float @llvm.fabs.f32(float %a)
%b.fabs = call float @llvm.fabs.f32(float %b)
Expand Down Expand Up @@ -374,8 +366,7 @@ define float @v_fmaximum3_f32_fneg0(float %a, float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32_fneg0:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, -v0, v1, v1
; GFX950-NEXT: v_maximum3_f32 v0, v0, v2, v2
; GFX950-NEXT: v_maximum3_f32 v0, -v0, v1, v2
; GFX950-NEXT: s_setpc_b64 s[30:31]
%a.fneg = fneg float %a
%max0 = call float @llvm.maximum.f32(float %a.fneg, float %b)
Expand Down Expand Up @@ -411,8 +402,7 @@ define float @v_fmaximum3_f32_fneg1(float %a, float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32_fneg1:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, v0, -v1, -v1
; GFX950-NEXT: v_maximum3_f32 v0, v0, v2, v2
; GFX950-NEXT: v_maximum3_f32 v0, v0, -v1, v2
; GFX950-NEXT: s_setpc_b64 s[30:31]
%b.fneg = fneg float %b
%max0 = call float @llvm.maximum.f32(float %a, float %b.fneg)
Expand Down Expand Up @@ -448,8 +438,7 @@ define float @v_fmaximum3_f32_fneg2(float %a, float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32_fneg2:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, v1
; GFX950-NEXT: v_maximum3_f32 v0, v0, -v2, -v2
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, -v2
; GFX950-NEXT: s_setpc_b64 s[30:31]
%c.fneg = fneg float %c
%max0 = call float @llvm.maximum.f32(float %a, float %b)
Expand Down Expand Up @@ -486,8 +475,7 @@ define float @v_fmaximum3_f32_const0(float %b, float %c) {
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: s_mov_b32 s0, 0x41000000
; GFX950-NEXT: v_maximum3_f32 v0, v0, s0, s0
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, v1
; GFX950-NEXT: v_maximum3_f32 v0, v0, s0, v1
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call float @llvm.maximum.f32(float 8.0, float %b)
%max1 = call float @llvm.maximum.f32(float %max0, float %c)
Expand Down Expand Up @@ -522,9 +510,8 @@ define float @v_fmaximum3_f32__const2(float %a, float %b) {
; GFX950-LABEL: v_fmaximum3_f32__const2:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, v1
; GFX950-NEXT: s_mov_b32 s0, 0x41000000
; GFX950-NEXT: v_maximum3_f32 v0, v0, s0, s0
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, s0
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call float @llvm.maximum.f32(float %a, float %b)
%max1 = call float @llvm.maximum.f32(float %max0, float 8.0)
Expand Down Expand Up @@ -559,8 +546,7 @@ define float @v_fmaximum3_f32_inlineimm0(float %b, float %c) {
; GFX950-LABEL: v_fmaximum3_f32_inlineimm0:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, v0, 4.0, 4.0
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, v1
; GFX950-NEXT: v_maximum3_f32 v0, v0, 4.0, v1
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call float @llvm.maximum.f32(float 4.0, float %b)
%max1 = call float @llvm.maximum.f32(float %max0, float %c)
Expand Down Expand Up @@ -595,8 +581,7 @@ define float @v_fmaximum3_f32__inlineimm(float %a, float %b) {
; GFX950-LABEL: v_fmaximum3_f32__inlineimm:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, v1
; GFX950-NEXT: v_maximum3_f32 v0, v0, 4.0, 4.0
; GFX950-NEXT: v_maximum3_f32 v0, v0, v1, 4.0
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call float @llvm.maximum.f32(float %a, float %b)
%max1 = call float @llvm.maximum.f32(float %max0, float 4.0)
Expand Down Expand Up @@ -634,9 +619,8 @@ define float @v_fmaximum3_f32_const1_const2(float %a) {
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: s_mov_b32 s0, 0x41000000
; GFX950-NEXT: v_maximum3_f32 v0, v0, s0, s0
; GFX950-NEXT: s_mov_b32 s0, 0x41800000
; GFX950-NEXT: v_maximum3_f32 v0, v0, s0, s0
; GFX950-NEXT: v_mov_b32_e32 v1, 0x41800000
; GFX950-NEXT: v_maximum3_f32 v0, v0, s0, v1
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call float @llvm.maximum.f32(float %a, float 8.0)
%max1 = call float @llvm.maximum.f32(float %max0, float 16.0)
Expand Down Expand Up @@ -680,10 +664,8 @@ define <2 x float> @v_fmaximum3_v2f32(<2 x float> %a, <2 x float> %b, <2 x float
; GFX950-LABEL: v_fmaximum3_v2f32:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v1, v1, v3, v3
; GFX950-NEXT: v_maximum3_f32 v0, v0, v2, v2
; GFX950-NEXT: v_maximum3_f32 v0, v4, v0, v0
; GFX950-NEXT: v_maximum3_f32 v1, v5, v1, v1
; GFX950-NEXT: v_maximum3_f32 v0, v4, v0, v2
; GFX950-NEXT: v_maximum3_f32 v1, v5, v1, v3
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call <2 x float> @llvm.maximum.v2f32(<2 x float> %a, <2 x float> %b)
%max1 = call <2 x float> @llvm.maximum.v2f32(<2 x float> %c, <2 x float> %max0)
Expand Down Expand Up @@ -727,10 +709,8 @@ define <2 x float> @v_fmaximum3_v2f32_commute(<2 x float> %a, <2 x float> %b, <2
; GFX950-LABEL: v_fmaximum3_v2f32_commute:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v1, v1, v3, v3
; GFX950-NEXT: v_maximum3_f32 v0, v0, v2, v2
; GFX950-NEXT: v_maximum3_f32 v0, v0, v4, v4
; GFX950-NEXT: v_maximum3_f32 v1, v1, v5, v5
; GFX950-NEXT: v_maximum3_f32 v0, v0, v2, v4
; GFX950-NEXT: v_maximum3_f32 v1, v1, v3, v5
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call <2 x float> @llvm.maximum.v2f32(<2 x float> %a, <2 x float> %b)
%max1 = call <2 x float> @llvm.maximum.v2f32(<2 x float> %max0, <2 x float> %c)
Expand Down Expand Up @@ -774,10 +754,8 @@ define <2 x float> @v_fmaximum3_v2f32__fabs_all(<2 x float> %a, <2 x float> %b,
; GFX950-LABEL: v_fmaximum3_v2f32__fabs_all:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v1, |v1|, |v3|, |v3|
; GFX950-NEXT: v_maximum3_f32 v0, |v0|, |v2|, |v2|
; GFX950-NEXT: v_maximum3_f32 v0, v0, |v4|, |v4|
; GFX950-NEXT: v_maximum3_f32 v1, v1, |v5|, |v5|
; GFX950-NEXT: v_maximum3_f32 v0, |v0|, |v2|, |v4|
; GFX950-NEXT: v_maximum3_f32 v1, |v1|, |v3|, |v5|
; GFX950-NEXT: s_setpc_b64 s[30:31]
%a.fabs = call <2 x float> @llvm.fabs.v2f32(<2 x float> %a)
%b.fabs = call <2 x float> @llvm.fabs.v2f32(<2 x float> %b)
Expand Down Expand Up @@ -824,10 +802,8 @@ define <2 x float> @v_fmaximum3_v2f32__fneg_all(<2 x float> %a, <2 x float> %b,
; GFX950-LABEL: v_fmaximum3_v2f32__fneg_all:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v1, -v1, -v3, -v3
; GFX950-NEXT: v_maximum3_f32 v0, -v0, -v2, -v2
; GFX950-NEXT: v_maximum3_f32 v0, v0, -v4, -v4
; GFX950-NEXT: v_maximum3_f32 v1, v1, -v5, -v5
; GFX950-NEXT: v_maximum3_f32 v0, -v0, -v2, -v4
; GFX950-NEXT: v_maximum3_f32 v1, -v1, -v3, -v5
; GFX950-NEXT: s_setpc_b64 s[30:31]
%a.fneg = fneg <2 x float> %a
%b.fneg = fneg <2 x float> %b
Expand Down Expand Up @@ -874,10 +850,8 @@ define <2 x float> @v_fmaximum3_v2f32__inlineimm1(<2 x float> %a, <2 x float> %c
; GFX950-LABEL: v_fmaximum3_v2f32__inlineimm1:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v1, v1, 2.0, 2.0
; GFX950-NEXT: v_maximum3_f32 v0, v0, 2.0, 2.0
; GFX950-NEXT: v_maximum3_f32 v0, v0, v2, v2
; GFX950-NEXT: v_maximum3_f32 v1, v1, v3, v3
; GFX950-NEXT: v_maximum3_f32 v0, v0, 2.0, v2
; GFX950-NEXT: v_maximum3_f32 v1, v1, 2.0, v3
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call <2 x float> @llvm.maximum.v2f32(<2 x float> %a, <2 x float> <float 2.0, float 2.0>)
%max1 = call <2 x float> @llvm.maximum.v2f32(<2 x float> %max0, <2 x float> %c)
Expand Down Expand Up @@ -921,10 +895,8 @@ define <2 x float> @v_fmaximum3_v2f32__inlineimm2(<2 x float> %a, <2 x float> %b
; GFX950-LABEL: v_fmaximum3_v2f32__inlineimm2:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v1, v1, v3, v3
; GFX950-NEXT: v_maximum3_f32 v0, v0, v2, v2
; GFX950-NEXT: v_maximum3_f32 v0, v0, 4.0, 4.0
; GFX950-NEXT: v_maximum3_f32 v1, v1, 4.0, 4.0
; GFX950-NEXT: v_maximum3_f32 v0, v0, v2, 4.0
; GFX950-NEXT: v_maximum3_f32 v1, v1, v3, 4.0
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call <2 x float> @llvm.maximum.v2f32(<2 x float> %a, <2 x float> %b)
%max1 = call <2 x float> @llvm.maximum.v2f32(<2 x float> %max0, <2 x float> <float 4.0, float 4.0>)
Expand Down Expand Up @@ -977,12 +949,9 @@ define <3 x float> @v_fmaximum3_v3f32(<3 x float> %a, <3 x float> %b, <3 x float
; GFX950-LABEL: v_fmaximum3_v3f32:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v2, v2, v5, v5
; GFX950-NEXT: v_maximum3_f32 v1, v1, v4, v4
; GFX950-NEXT: v_maximum3_f32 v0, v0, v3, v3
; GFX950-NEXT: v_maximum3_f32 v0, v6, v0, v0
; GFX950-NEXT: v_maximum3_f32 v1, v7, v1, v1
; GFX950-NEXT: v_maximum3_f32 v2, v8, v2, v2
; GFX950-NEXT: v_maximum3_f32 v0, v6, v0, v3
; GFX950-NEXT: v_maximum3_f32 v1, v7, v1, v4
; GFX950-NEXT: v_maximum3_f32 v2, v8, v2, v5
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call <3 x float> @llvm.maximum.v3f32(<3 x float> %a, <3 x float> %b)
%max1 = call <3 x float> @llvm.maximum.v3f32(<3 x float> %c, <3 x float> %max0)
Expand Down Expand Up @@ -1035,12 +1004,9 @@ define <3 x float> @v_fmaximum3_v3f32_commute(<3 x float> %a, <3 x float> %b, <3
; GFX950-LABEL: v_fmaximum3_v3f32_commute:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v2, v2, v5, v5
; GFX950-NEXT: v_maximum3_f32 v1, v1, v4, v4
; GFX950-NEXT: v_maximum3_f32 v0, v0, v3, v3
; GFX950-NEXT: v_maximum3_f32 v0, v0, v6, v6
; GFX950-NEXT: v_maximum3_f32 v1, v1, v7, v7
; GFX950-NEXT: v_maximum3_f32 v2, v2, v8, v8
; GFX950-NEXT: v_maximum3_f32 v0, v0, v3, v6
; GFX950-NEXT: v_maximum3_f32 v1, v1, v4, v7
; GFX950-NEXT: v_maximum3_f32 v2, v2, v5, v8
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call <3 x float> @llvm.maximum.v3f32(<3 x float> %a, <3 x float> %b)
%max1 = call <3 x float> @llvm.maximum.v3f32(<3 x float> %max0, <3 x float> %c)
Expand Down Expand Up @@ -1093,12 +1059,9 @@ define <3 x float> @v_fmaximum3_v3f32__fabs_all(<3 x float> %a, <3 x float> %b,
; GFX950-LABEL: v_fmaximum3_v3f32__fabs_all:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v2, |v2|, |v5|, |v5|
; GFX950-NEXT: v_maximum3_f32 v1, |v1|, |v4|, |v4|
; GFX950-NEXT: v_maximum3_f32 v0, |v0|, |v3|, |v3|
; GFX950-NEXT: v_maximum3_f32 v0, v0, |v6|, |v6|
; GFX950-NEXT: v_maximum3_f32 v1, v1, |v7|, |v7|
; GFX950-NEXT: v_maximum3_f32 v2, v2, |v8|, |v8|
; GFX950-NEXT: v_maximum3_f32 v0, |v0|, |v3|, |v6|
; GFX950-NEXT: v_maximum3_f32 v1, |v1|, |v4|, |v7|
; GFX950-NEXT: v_maximum3_f32 v2, |v2|, |v5|, |v8|
; GFX950-NEXT: s_setpc_b64 s[30:31]
%a.fabs = call <3 x float> @llvm.fabs.v3f32(<3 x float> %a)
%b.fabs = call <3 x float> @llvm.fabs.v3f32(<3 x float> %b)
Expand Down Expand Up @@ -1154,12 +1117,9 @@ define <3 x float> @v_fmaximum3_v3f32__fneg_all(<3 x float> %a, <3 x float> %b,
; GFX950-LABEL: v_fmaximum3_v3f32__fneg_all:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v2, -v2, -v5, -v5
; GFX950-NEXT: v_maximum3_f32 v1, -v1, -v4, -v4
; GFX950-NEXT: v_maximum3_f32 v0, -v0, -v3, -v3
; GFX950-NEXT: v_maximum3_f32 v0, v0, -v6, -v6
; GFX950-NEXT: v_maximum3_f32 v1, v1, -v7, -v7
; GFX950-NEXT: v_maximum3_f32 v2, v2, -v8, -v8
; GFX950-NEXT: v_maximum3_f32 v0, -v0, -v3, -v6
; GFX950-NEXT: v_maximum3_f32 v1, -v1, -v4, -v7
; GFX950-NEXT: v_maximum3_f32 v2, -v2, -v5, -v8
; GFX950-NEXT: s_setpc_b64 s[30:31]
%a.fneg = fneg <3 x float> %a
%b.fneg = fneg <3 x float> %b
Expand Down Expand Up @@ -1215,12 +1175,9 @@ define <3 x float> @v_fmaximum3_v3f32__inlineimm1(<3 x float> %a, <3 x float> %c
; GFX950-LABEL: v_fmaximum3_v3f32__inlineimm1:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v2, v2, 2.0, 2.0
; GFX950-NEXT: v_maximum3_f32 v1, v1, 2.0, 2.0
; GFX950-NEXT: v_maximum3_f32 v0, v0, 2.0, 2.0
; GFX950-NEXT: v_maximum3_f32 v0, v0, v3, v3
; GFX950-NEXT: v_maximum3_f32 v1, v1, v4, v4
; GFX950-NEXT: v_maximum3_f32 v2, v2, v5, v5
; GFX950-NEXT: v_maximum3_f32 v0, v0, 2.0, v3
; GFX950-NEXT: v_maximum3_f32 v1, v1, 2.0, v4
; GFX950-NEXT: v_maximum3_f32 v2, v2, 2.0, v5
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call <3 x float> @llvm.maximum.v3f32(<3 x float> %a, <3 x float> <float 2.0, float 2.0, float 2.0>)
%max1 = call <3 x float> @llvm.maximum.v3f32(<3 x float> %max0, <3 x float> %c)
Expand Down Expand Up @@ -1273,12 +1230,9 @@ define <3 x float> @v_fmaximum3_v3f32__inlineimm2(<3 x float> %a, <3 x float> %b
; GFX950-LABEL: v_fmaximum3_v3f32__inlineimm2:
; GFX950: ; %bb.0:
; GFX950-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX950-NEXT: v_maximum3_f32 v2, v2, v5, v5
; GFX950-NEXT: v_maximum3_f32 v1, v1, v4, v4
; GFX950-NEXT: v_maximum3_f32 v0, v0, v3, v3
; GFX950-NEXT: v_maximum3_f32 v0, v0, 4.0, 4.0
; GFX950-NEXT: v_maximum3_f32 v1, v1, 4.0, 4.0
; GFX950-NEXT: v_maximum3_f32 v2, v2, 4.0, 4.0
; GFX950-NEXT: v_maximum3_f32 v0, v0, v3, 4.0
; GFX950-NEXT: v_maximum3_f32 v1, v1, v4, 4.0
; GFX950-NEXT: v_maximum3_f32 v2, v2, v5, 4.0
; GFX950-NEXT: s_setpc_b64 s[30:31]
%max0 = call <3 x float> @llvm.maximum.v3f32(<3 x float> %a, <3 x float> %b)
%max1 = call <3 x float> @llvm.maximum.v3f32(<3 x float> %max0, <3 x float> <float 4.0, float 4.0, float 4.0>)
Expand Down
Loading

0 comments on commit f5e92eb

Please sign in to comment.