Skip to content

Commit bc36e82

Browse files
committed
Make sure to call fixPhi on live-outs
1 parent 2425c69 commit bc36e82

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3616,15 +3616,12 @@ void InnerLoopVectorizer::fixVectorizedLoop(VPTransformState &State,
36163616
State.Builder.SetInsertPoint(State.CFG.ExitBB,
36173617
State.CFG.ExitBB->getFirstNonPHIIt());
36183618
for (const auto &KV : Plan.getLiveOuts())
3619-
if (OrigLoop->getUniqueExitBlock() ||
3620-
KV.second->getPhi()->getParent() != OrigEarlyExitBB)
3621-
KV.second->fixPhi(Plan, State);
3619+
KV.second->fixPhi(Plan, State);
36223620

36233621
if (VectorEarlyExitBB) {
36243622
State.Builder.SetInsertPoint(VectorEarlyExitBB->getTerminator());
36253623
for (const auto &KV : Plan.getEarlyExitLiveOuts())
3626-
if (KV.second->getPhi()->getParent() == OrigEarlyExitBB)
3627-
KV.second->fixPhi(Plan, State);
3624+
KV.second->fixPhi(Plan, State);
36283625
}
36293626

36303627
for (Instruction *PI : PredicatedInstructions)

0 commit comments

Comments
 (0)