llvm.org GIT mirror llvm / d49468a
Add testcase from PR3086. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69862 91177308-0d34-0410-b5e6-96231b3b80d8 Owen Anderson 10 years ago
1 changed file(s) with 28 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -loop-reduce -disable-output
1 ; PR 3086
2
3 %struct.Cls = type { i32, i8, [2 x %struct.Cls*], [2 x %struct.Lit*] }
4 %struct.Lit = type { i8 }
5
6 define fastcc i64 @collect_clauses() nounwind {
7 entry:
8 br label %bb11
9
10 bb5: ; preds = %bb9
11 %0 = load %struct.Lit** %storemerge, align 8 ; <%struct.Lit*> [#uses=0]
12 %indvar.next8 = add i64 %storemerge.rec, 1 ; [#uses=1]
13 br label %bb9
14
15 bb9: ; preds = %bb22, %bb5
16 %storemerge.rec = phi i64 [ %indvar.next8, %bb5 ], [ 0, %bb22 ] ; [#uses=2]
17 %storemerge = getelementptr %struct.Lit** null, i64 %storemerge.rec ; <%struct.Lit**> [#uses=2]
18 %1 = icmp ugt %struct.Lit** null, %storemerge ; [#uses=1]
19 br i1 %1, label %bb5, label %bb22
20
21 bb11: ; preds = %bb22, %entry
22 %2 = load %struct.Cls** null, align 8 ; <%struct.Cls*> [#uses=0]
23 br label %bb22
24
25 bb22: ; preds = %bb11, %bb9
26 br i1 false, label %bb11, label %bb9
27 }