[llvm] [SLP] Let the caller tell canConvertToFMA which operand holds the fmul (PR #218754)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 30 07:28:45 PDT 2026


================
@@ -13712,12 +13712,21 @@ bool BoUpSLP::areAllUsersVectorized(
          });
 }
 
-static InstructionCost canConvertToFMA(ArrayRef<Value *> VL,
-                                       const InstructionsState &S,
-                                       DominatorTree &DT, const DataLayout &DL,
-                                       TargetTransformInfo &TTI,
-                                       const TargetLibraryInfo &TLI,
-                                       const TTI::TargetCostKind CostKind);
+static InstructionCost
+canConvertToFMA(ArrayRef<Value *> VL, const InstructionsState &S,
+                DominatorTree &DT, const DataLayout &DL,
+                TargetTransformInfo &TTI, const TargetLibraryInfo &TLI,
+                const TTI::TargetCostKind CostKind, unsigned FMulOpIdx = 0);
----------------
MrSidims wrote:

"Looks like not all calls of canConvertToFMA are updated" - this is also not fully addressed. Some issues I face are trivial - update  AVX 512 shuffle cost, some are outside of my expertise. 

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


More information about the llvm-commits mailing list