Skip to content

Commit 29c4d81

Browse files
committed
Fixup! Remove live-out since it's in the loop.
1 parent 5eadd23 commit 29c4d81

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

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

14881488
TTI::CastContextHint CCH = TTI::CastContextHint::None;
14891489
// For Trunc, the context is the only user, which must be a
1490-
// VPWidenStoreRecipe, a VPInterleaveRecipe ,a VPReplicateRecipe or a live-out
1491-
// value.
1490+
// VPWidenStoreRecipe, a VPInterleaveRecipe ,or a VPReplicateRecipe.
14921491
if ((Opcode == Instruction::Trunc || Opcode == Instruction::FPTrunc) &&
14931492
!hasMoreThanOneUniqueUser() && getNumUsers() > 0) {
1494-
auto *StoreRecipe = dyn_cast<VPRecipeBase>(*user_begin());
1495-
if (isa<VPLiveOut>(*user_begin()))
1496-
CCH = TTI::CastContextHint::Normal;
1497-
else if (StoreRecipe)
1493+
if (auto *StoreRecipe = dyn_cast<VPRecipeBase>(*user_begin()))
14981494
CCH = ComputeCCH(StoreRecipe);
14991495
}
15001496
// For Z/Sext, the context is the operand, which must be a VPWidenLoadRecipe,
15011497
// a VPInterleaveRecipe, a VPReplicateRecipe or a live-in value.
15021498
else if (Opcode == Instruction::ZExt || Opcode == Instruction::SExt ||
15031499
Opcode == Instruction::FPExt) {
1504-
const VPRecipeBase *LoadRecipe = getOperand(0)->getDefiningRecipe();
15051500
if (getOperand(0)->isLiveIn())
15061501
CCH = TTI::CastContextHint::Normal;
1507-
else if (LoadRecipe)
1508-
CCH = ComputeCCH(LoadRecipe);
1502+
else if (getOperand(0)->getDefiningRecipe())
1503+
CCH = ComputeCCH(getOperand(0)->getDefiningRecipe());
15091504
}
15101505

15111506
auto *SrcTy = cast<VectorType>(

0 commit comments

Comments
 (0)