Skip to content

Commit 3957b6c

Browse files
committed
Address review comments
1 parent 3857530 commit 3957b6c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5332,10 +5332,10 @@ LoopVectorizationCostModel::getUniformMemOpCost(Instruction *I,
53325332
StoreInst *SI = cast<StoreInst>(I);
53335333

53345334
bool IsLoopInvariantStoreValue = Legal->isInvariant(SI->getValueOperand());
5335-
// TODO: We have tests that request the cost of extracting element
5336-
// VF.getKnownMinValue() - 1 from a scalable vector. This is actually
5337-
// meaningless, given what we actually want is the last lane and is likely
5338-
// to be more expensive.
5335+
// TODO: We have existing tests that request the cost of extracting element
5336+
// VF.getKnownMinValue() - 1 from a scalable vector. This does not represent
5337+
// the actual generated code, which involves extracting the last element of
5338+
// a scalable vector where the lane to extract is unknown at compile time.
53395339
return TTI.getAddressComputationCost(ValTy) +
53405340
TTI.getMemoryOpCost(Instruction::Store, ValTy, Alignment, AS,
53415341
CostKind) +

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3462,6 +3462,7 @@ void VPInterleaveRecipe::execute(VPTransformState &State) {
34623462

34633463
return;
34643464
}
3465+
assert(!State.VF.isScalable() && "VF is assumed to be non scalable.");
34653466

34663467
// For each member in the group, shuffle out the appropriate data from the
34673468
// wide loads.

0 commit comments

Comments
 (0)