Skip to content

Commit bae8d30

Browse files
committed
Address review comments
1 parent b5c5289 commit bae8d30

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
@@ -5342,10 +5342,10 @@ LoopVectorizationCostModel::getUniformMemOpCost(Instruction *I,
53425342
StoreInst *SI = cast<StoreInst>(I);
53435343

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

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

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

34963496
return;
34973497
}
3498+
assert(!State.VF.isScalable() && "VF is assumed to be non scalable.");
34983499

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

0 commit comments

Comments
 (0)