[llvm] [LV] Remove selectUserVF, remove use of legacy expectedCost (NFCI) (PR #191216)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 21 02:07:31 PDT 2026
================
@@ -4994,15 +4987,7 @@ InstructionCost LoopVectorizationCostModel::computePredInstDiscount(
InstructionCost LoopVectorizationCostModel::expectedCost(ElementCount VF) {
InstructionCost Cost;
-
- // If the vector loop gets executed exactly once with the given VF, ignore the
- // costs of comparison and induction instructions, as they'll get simplified
- // away.
- SmallPtrSet<Instruction *, 2> ValuesToIgnoreForVF;
- auto TC = getSmallConstantTripCount(PSE.getSE(), TheLoop);
- if (TC == VF && !foldTailByMasking())
- addFullyUnrolledInstructionsToIgnore(TheLoop, Legal->getInductionVars(),
- ValuesToIgnoreForVF);
+ assert(VF.isScalar() && "must only be called for scalar VFs");
// For each block.
----------------
ayalz wrote:
```suggestion
```
goes w/o saying
https://github.com/llvm/llvm-project/pull/191216
More information about the llvm-commits
mailing list