Mercurial > hg > CbC > CbC_llvm
comparison test/Transforms/IndVarSimplify/2008-10-03-CouldNotCompute.ll @ 0:95c75e76d11b LLVM3.4
LLVM 3.4
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 12 Dec 2013 13:56:28 +0900 |
parents | |
children | afa8332a0e37 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:95c75e76d11b |
---|---|
1 ; RUN: opt < %s -indvars | |
2 ; PR2857 | |
3 | |
4 @foo = external global i32 ; <i32*> [#uses=1] | |
5 | |
6 define void @test(i32 %n, i32 %arg) { | |
7 entry: | |
8 br i1 false, label %bb.nph, label %return | |
9 | |
10 bb.nph: ; preds = %entry | |
11 %0 = load i32* @foo, align 4 ; <i32> [#uses=1] | |
12 %1 = sext i32 %0 to i64 ; <i64> [#uses=1] | |
13 br label %bb | |
14 | |
15 bb: ; preds = %bb, %bb.nph | |
16 %.in = phi i32 [ %2, %bb ], [ %n, %bb.nph ] ; <i32> [#uses=1] | |
17 %val.02 = phi i64 [ %5, %bb ], [ 0, %bb.nph ] ; <i64> [#uses=2] | |
18 %result.01 = phi i64 [ %4, %bb ], [ 0, %bb.nph ] ; <i64> [#uses=1] | |
19 %2 = add i32 %.in, -1 ; <i32> [#uses=2] | |
20 %3 = mul i64 %1, %val.02 ; <i64> [#uses=1] | |
21 %4 = add i64 %3, %result.01 ; <i64> [#uses=2] | |
22 %5 = add i64 %val.02, 1 ; <i64> [#uses=1] | |
23 %6 = icmp sgt i32 %2, 0 ; <i1> [#uses=1] | |
24 br i1 %6, label %bb, label %bb3.bb4_crit_edge | |
25 | |
26 bb3.bb4_crit_edge: ; preds = %bb | |
27 %.lcssa = phi i64 [ %4, %bb ] ; <i64> [#uses=0] | |
28 ret void | |
29 | |
30 return: ; preds = %entry | |
31 ret void | |
32 } |