llvm.org GIT mirror llvm / cf6af30
New test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41799 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 12 years ago
1 changed file(s) with 32 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -loop-unswitch -indvars -disable-output
1 ; Require SCEV before LCSSA.
2 define void @foo() {
3 entry:
4 %i = alloca i32, align 4 ; [#uses=5]
5 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
6 store i32 0, i32* %i, align 4
7 br label %bb3
8
9 bb: ; preds = %bb3
10 %tmp = load i32* %i, align 4 ; [#uses=1]
11 call void @bar( i32 %tmp )
12 %tmp1 = load i32* %i, align 4 ; [#uses=1]
13 %tmp2 = add i32 %tmp1, 1 ; [#uses=1]
14 store i32 %tmp2, i32* %i, align 4
15 br label %bb3
16
17 bb3: ; preds = %bb, %entry
18 %tmp4 = load i32* %i, align 4 ; [#uses=1]
19 %tmp5 = icmp sle i32 %tmp4, 9 ; [#uses=1]
20 %tmp56 = zext i1 %tmp5 to i8 ; [#uses=1]
21 %toBool = icmp ne i8 %tmp56, 0 ; [#uses=1]
22 br i1 %toBool, label %bb, label %bb7
23
24 bb7: ; preds = %bb3
25 br label %return
26
27 return: ; preds = %bb7
28 ret void
29 }
30
31 declare void @bar(i32)