[llvm-branch-commits] [llvm] [SLP] Drop the context of a vector fmul whose user is not vectorized (PR #228902)
Dmitry Sidorov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Oct 4 10:16:42 PDT 2026
================
@@ -17575,9 +17575,22 @@ BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
unsigned OpIdx = isa<UnaryOperator>(VL0) ? 0 : 1;
TTI::OperandValueInfo Op1Info = getOperandInfo(E->getOperand(0));
TTI::OperandValueInfo Op2Info = getOperandInfo(E->getOperand(OpIdx));
+ // A target may price an fmul by the fadd or fsub user of its context.
----------------
MrSidims wrote:
But TTI can't decide it. It gets a vector type and a scalar instruction and nothing tells it whether the user of that instruction is vectorized. So the info is wrong here as the only user the only user of the context is a contract fadd, that user is what the target reads to price the fmul as fused, and the vector fmul of a root has no such user, its lanes are extracted.
https://github.com/llvm/llvm-project/pull/228902
More information about the llvm-branch-commits
mailing list