Skip to content

Commit a480d51

Browse files
committed
[VPlan] Use existing vector trip count VPValue for resume phi (NFC)
Instead of going through getOrAddLiveIn to get a VPValue for the vector trip count retrieve it directly from VPlan via getVectorTripCount. Small simplification following 0e70289.
1 parent 625ec7e commit a480d51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2747,7 +2747,7 @@ void InnerLoopVectorizer::createInductionResumeVPValues(
27472747
// no suitable resume phi was already created.
27482748
ScalarPHBuilder.createNaryOp(
27492749
VPInstruction::ResumePhi,
2750-
{Plan.getOrAddLiveIn(VectorTripCount),
2750+
{&Plan.getVectorTripCount(),
27512751
Plan.getOrAddLiveIn(ConstantInt::get(VectorTripCount->getType(), 0))},
27522752
{}, "vec.epilog.resume.val");
27532753
}

0 commit comments

Comments
 (0)