[clang] [llvm] DAGCombiner: Drop AllowFPOpFusion from visitFADDForFMACombine (PR #221436)

via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 6 04:32:14 PDT 2026


================
@@ -252,21 +252,16 @@ __host__ __device__ float func2(float a, float b, float c) {
 // AMD-OPT-OFF-NEXT: v_add_f32_e32
 // AMD-OPT-OFF-NEXT: s_setpc_b64
 
-// Test multiply/add in the different statements, which is forced
-// to be compiled with fp contract on. fmul/fadd without contract
-// flags are emitted in IR. In nvptx, they are emitted as FMA in
-// fp-contract is fast but not on, as nvptx backend uses the same
-// fp fuse option as front end, whereas fast fp fuse option in
-// backend fuses fadd/fmul disregarding contract flag. In amdgcn
-// they are not fused as amdgcn always use standard fp fusion
-// option which respects contract flag.
+// Test multiply/add in the different statements, which is forced to be compiled
+// with fp contract on. fmul/fadd without contract flags are emitted in IR.
   __host__ __device__ float func3(float a, float b, float c) {
 #pragma clang fp contract(on)
   float t = b * c;
   return t + a;
 }
 // COMMON-LABEL: _Z5func3fff
-// NV-OPT-FAST: fma.rn.f32
+// NV-OPT-FAST: mul.rn.f32
+// NV-OPT-FAST: add.rn.f32
----------------
paperchalice wrote:

Seems like a regression.

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


More information about the cfe-commits mailing list