Skip to content

Commit c16e378

Browse files
committed
[VPlan] Clarify setting Lane in fixPhi (NFCI).
Split off from #94760, clarify as suggested.
1 parent c530dad commit c16e378

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ bool VPRecipeBase::mayHaveSideEffects() const {
189189
}
190190

191191
void VPLiveOut::fixPhi(VPlan &Plan, VPTransformState &State) {
192-
auto Lane = VPLane::getLastLaneForVF(State.VF);
193192
VPValue *ExitValue = getOperand(0);
194-
if (vputils::isUniformAfterVectorization(ExitValue))
195-
Lane = VPLane::getFirstLane();
193+
auto Lane = vputils::isUniformAfterVectorization(ExitValue)
194+
? VPLane::getFirstLane()
195+
: VPLane::getLastLaneForVF(State.VF);
196196
VPBasicBlock *MiddleVPBB =
197197
cast<VPBasicBlock>(Plan.getVectorLoopRegion()->getSingleSuccessor());
198198
BasicBlock *MiddleBB = State.CFG.VPBB2IRBB[MiddleVPBB];

0 commit comments

Comments
 (0)