[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.
This commit is contained in:
@@ -921,7 +921,7 @@ VPIRBasicBlock *VPlan::getExitBlock(BasicBlock *IRBB) const {
|
||||
}
|
||||
|
||||
bool VPlan::isExitBlock(VPBlockBase *VPBB) {
|
||||
return isa<VPIRBasicBlock>(VPBB) && VPBB->getNumSuccessors() == 0;
|
||||
return is_contained(ExitBlocks, VPBB);
|
||||
}
|
||||
|
||||
/// Generate the code inside the preheader and body of the vectorized loop.
|
||||
|
||||
Reference in New Issue
Block a user