Skip to content

Commit dcaed17

Browse files
committed
!fixup, update comments.
1 parent ce30391 commit dcaed17

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2439,9 +2439,11 @@ void VPlanTransforms::handleUncountableEarlyExit(
24392439
}
24402440

24412441
auto IsVector = [](ElementCount VF) { return VF.isVector(); };
2442-
// Add the incoming value from the early exit.
2442+
// When the VFs are vectors, need to add `extract` to get the incoming value
2443+
// from early exit. When the range contains scalar VF, limit the range to
2444+
// scalar VF to prevent mis-compilation for the range containing both scalar
2445+
// and vector VFs.
24432446
if (!IncomingFromEarlyExit->isLiveIn() &&
2444-
// Limit range to scalar VF only, if the range contains the scalar VF.
24452447
LoopVectorizationPlanner::getDecisionAndClampRange(IsVector, Range)) {
24462448
VPValue *FirstActiveLane = EarlyExitB.createNaryOp(
24472449
VPInstruction::FirstActiveLane, {EarlyExitTakenCond}, nullptr,

0 commit comments

Comments
 (0)