llvm.org GIT mirror llvm / 73362c8
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 Tobias Grosser 9 years ago
2 changed file(s) with 24 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
135135 return false;
136136
137137 for (pred_iterator PI = pred_begin(entry), PE = pred_end(entry); PI != PE;
138 ++PI)
139 if (!contains(*PI)) {
138 ++PI) {
139 BasicBlock *Pred = *PI;
140 if (DT->getNode(Pred) && !contains(Pred)) {
140141 if (found) {
141142 isSimple = false;
142143 break;
143144 }
144145 found = true;
145146 }
147 }
146148
147149 found = false;
148150
0 ; RUN: opt -regions %s
1 define i32 @main() nounwind {
2 entry:
3 br label %for.cond
4
5 test:
6 br label %for.cond
7
8 for.cond: ; preds = %for.inc, %entry
9 br i1 true, label %for.body, label %for.end
10
11 for.body: ; preds = %for.cond
12 br label %for.inc
13
14 for.inc: ; preds = %for.body
15 br label %for.cond
16
17 for.end: ; preds = %for.cond
18 ret i32 0
19 }