Skip to content

Commit 8d71a2a

Browse files
committed
[VPlan] Use ExitBocks to check in VPlan::isExitBlock (NFC).
Exit blocks of the VPlan are now hold in ExitBlocks. Use it to check if a block is an exit block. Otherwise we currently mis-classify the scalar loop header also as exit block, as it is not explicitly connected to the exit blocks. NFC at the moment, as the helper currently is never queried with the scalar header, but that will change in the future.
1 parent 53e1c8b commit 8d71a2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlan.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ VPIRBasicBlock *VPlan::getExitBlock(BasicBlock *IRBB) const {
921921
}
922922

923923
bool VPlan::isExitBlock(VPBlockBase *VPBB) {
924-
return isa<VPIRBasicBlock>(VPBB) && VPBB->getNumSuccessors() == 0;
924+
return is_contained(ExitBlocks, VPBB);
925925
}
926926

927927
/// Generate the code inside the preheader and body of the vectorized loop.

0 commit comments

Comments
 (0)