Skip to content

Commit 230a0d2

Browse files
committed
Fixup! Refine comments.
1 parent fe37f08 commit 230a0d2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,15 +1487,13 @@ InstructionCost VPWidenCastRecipe::computeCost(ElementCount VF,
14871487

14881488
VPValue *Operand = getOperand(0);
14891489
TTI::CastContextHint CCH = TTI::CastContextHint::None;
1490-
// For Trunc, the context is the only user, which must be a
1491-
// VPWidenStoreRecipe, a VPInterleaveRecipe ,or a VPReplicateRecipe.
1490+
// For Trunc/FPTrunc, get the context from the only user.
14921491
if ((Opcode == Instruction::Trunc || Opcode == Instruction::FPTrunc) &&
14931492
!hasMoreThanOneUniqueUser() && getNumUsers() > 0) {
14941493
if (auto *StoreRecipe = dyn_cast<VPRecipeBase>(*user_begin()))
14951494
CCH = ComputeCCH(StoreRecipe);
14961495
}
1497-
// For Z/Sext, the context is the operand, which must be a VPWidenLoadRecipe,
1498-
// a VPInterleaveRecipe, a VPReplicateRecipe or a live-in value.
1496+
// For Z/Sext, get the context from the operand.
14991497
else if (Opcode == Instruction::ZExt || Opcode == Instruction::SExt ||
15001498
Opcode == Instruction::FPExt) {
15011499
if (Operand->isLiveIn())

0 commit comments

Comments
 (0)