[llvm] [AMDGPU][DAGCombiner][GlobalISel] Prevent FMA contraction when multiply cannot be eliminated (PR #169735)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 09:06:36 PST 2025


================
@@ -710,9 +658,9 @@ define float @fsub_muladd_fpext_mul_f16_to_f32(float %x, float %y, float %z, hal
 ; GFX9-F32FLUSH-LABEL: fsub_muladd_fpext_mul_f16_to_f32:
 ; GFX9-F32FLUSH:       ; %bb.0: ; %entry
 ; GFX9-F32FLUSH-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
-; GFX9-F32FLUSH-NEXT:    v_mad_mix_f32 v2, v3, v4, -v2 op_sel_hi:[1,1,0]
-; GFX9-F32FLUSH-NEXT:    v_mac_f32_e32 v2, v0, v1
-; GFX9-F32FLUSH-NEXT:    v_mov_b32_e32 v0, v2
+; GFX9-F32FLUSH-NEXT:    v_mul_f16_e32 v3, v3, v4
----------------
arsenm wrote:

Sort of neutral, but the copy was better than v_sub_f32

https://github.com/llvm/llvm-project/pull/169735


More information about the llvm-commits mailing list