Skip to content

Commit c9a87b4

Browse files
committed
[VPlan] Retrieve latch terminator from VPlan. (NFC)
Remove an unnecessary lookup via original IR loop.
1 parent bc7487d commit c9a87b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ void VPlanTransforms::prepareForVectorization(
566566
// the corresponding compare because they may have ended up with different
567567
// line numbers and we want to avoid awkward line stepping while debugging.
568568
// E.g., if the compare has got a line number inside the loop.
569-
DebugLoc LatchDL = TheLoop->getLoopLatch()->getTerminator()->getDebugLoc();
569+
DebugLoc LatchDL = LatchVPBB->getTerminator()->getDebugLoc();
570570
VPBuilder Builder(MiddleVPBB);
571571
VPValue *Cmp;
572572
if (!RequiresScalarEpilogueCheck)

0 commit comments

Comments
 (0)