[llvm] [SLP] Let the caller tell canConvertToFMA which operand holds the fmul (PR #218754)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 30 07:30:14 PDT 2026
================
@@ -34479,7 +34480,8 @@ bool SLPVectorizerPass::vectorizeOnceUsedSeeds(BasicBlock *BB, BoUpSLP &R) {
auto *U = cast<Instruction>(I.user_back());
if (InstructionsState S = getSameOpcode(U, *TLI);
S && S.isAddSubLikeOp() &&
- canConvertToFMA(U, S, *DT, *DL, *TTI, *TLI, R.getCostKind())
+ canConvertToFMA(U, S, *DT, *DL, *TTI, *TLI, R.getCostKind(),
+ U->getOperand(1) == &I ? 1 : 0)
----------------
alexey-bataev wrote:
```suggestion
getFMulOperandIdx(U))
```
?
https://github.com/llvm/llvm-project/pull/218754
More information about the llvm-commits
mailing list