[llvm] [SDAG] Heed enableAggressiveFMAFusion when folding fma(a,b,c*d)+e (PR #94209)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 02:01:05 PDT 2024


================
@@ -39,7 +39,7 @@ define amdgpu_ps float @_amdgpu_ps_main() #0 {
 ; GFX10-NEXT:    v_sub_f32_e32 v8, s0, v1
 ; GFX10-NEXT:    v_fma_f32 v7, -s2, v6, s6
 ; GFX10-NEXT:    v_fma_f32 v5, v6, v5, 1.0
-; GFX10-NEXT:    v_mad_f32 v10, s2, v6, v2
+; GFX10-NEXT:    v_fma_f32 v10, s2, v6, v2
----------------
arsenm wrote:

I think the restriction to only introduce it post legalization was dumb, I didn't repeat that in GlobalISel. It's easiest to just treat it consistently 

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


More information about the llvm-commits mailing list