diff options
-rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index f2ebce88dc6..d1ec2be6c2d 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -2489,6 +2489,13 @@ bool Scop::buildDomainsWithBranchConstraints(Region *R, ScopDetection &SD, isl_set *CondSet = ConditionSets[u]; BasicBlock *SuccBB = getRegionNodeSuccessor(RN, TI, u); + auto *SuccStmt = getStmtFor(SuccBB); + // Skip blocks outside the region. + if (!SuccStmt) { + isl_set_free(CondSet); + continue; + } + // If we propagate the domain of some block to "SuccBB" we do not have to // adjust the domain. if (FinishedExitBlocks.count(SuccBB)) { |