[llvm] [SLP] Fix canConvertToFMA operand selection and fmul costing (PR #216425)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 16 02:35:25 PDT 2026
================
@@ -14420,7 +14446,9 @@ static InstructionCost canConvertToFMA(ArrayRef<Value *> VL,
++NumOps;
if (auto *FPCI = dyn_cast<FPMathOperator>(I))
FMF &= FPCI->getFastMathFlags();
- FMulPlusFAddCost += TTI.getInstructionCost(I, CostKind);
+ FMulPlusFAddCost += I->getOpcode() == Instruction::FMul
+ ? GetUnfusedFMulCost(I)
+ : TTI.getInstructionCost(I, CostKind);
----------------
MrSidims wrote:
Yeah, totally forgot to update draft. Fixed, thanks!
https://github.com/llvm/llvm-project/pull/216425
More information about the llvm-commits
mailing list