mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-21 02:29:22 +00:00
RegionInfo: Do not assert if a BB is not part of the dominance tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110665 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0e28b1507f
commit
73362c820b
@ -136,14 +136,16 @@ bool Region::isSimple() const {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (pred_iterator PI = pred_begin(entry), PE = pred_end(entry); PI != PE;
|
for (pred_iterator PI = pred_begin(entry), PE = pred_end(entry); PI != PE;
|
||||||
++PI)
|
++PI) {
|
||||||
if (!contains(*PI)) {
|
BasicBlock *Pred = *PI;
|
||||||
|
if (DT->getNode(Pred) && !contains(Pred)) {
|
||||||
if (found) {
|
if (found) {
|
||||||
isSimple = false;
|
isSimple = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
found = false;
|
found = false;
|
||||||
|
|
||||||
|
20
test/Analysis/RegionInfo/20100809_bb_not_in_domtree.ll
Normal file
20
test/Analysis/RegionInfo/20100809_bb_not_in_domtree.ll
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
; RUN: opt -regions %s
|
||||||
|
define i32 @main() nounwind {
|
||||||
|
entry:
|
||||||
|
br label %for.cond
|
||||||
|
|
||||||
|
test:
|
||||||
|
br label %for.cond
|
||||||
|
|
||||||
|
for.cond: ; preds = %for.inc, %entry
|
||||||
|
br i1 true, label %for.body, label %for.end
|
||||||
|
|
||||||
|
for.body: ; preds = %for.cond
|
||||||
|
br label %for.inc
|
||||||
|
|
||||||
|
for.inc: ; preds = %for.body
|
||||||
|
br label %for.cond
|
||||||
|
|
||||||
|
for.end: ; preds = %for.cond
|
||||||
|
ret i32 0
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user