Mercurial > hg > CbC > CbC_llvm
comparison test/Analysis/BasicAA/phi-aa.ll @ 95:afa8332a0e37 LLVM3.8
LLVM 3.8
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 17:48:58 +0900 |
parents | 60c9769439b8 |
children | 1172e4bd9c6f |
comparison
equal
deleted
inserted
replaced
84:f3e34b893a5f | 95:afa8332a0e37 |
---|---|
23 bb1: | 23 bb1: |
24 br label %bb2 | 24 br label %bb2 |
25 | 25 |
26 bb2: | 26 bb2: |
27 %P = phi i32* [ @X, %bb ], [ @Y, %bb1 ] | 27 %P = phi i32* [ @X, %bb ], [ @Y, %bb1 ] |
28 %tmp1 = load i32* @Z, align 4 | 28 %tmp1 = load i32, i32* @Z, align 4 |
29 store i32 123, i32* %P, align 4 | 29 store i32 123, i32* %P, align 4 |
30 %tmp2 = load i32* @Z, align 4 | 30 %tmp2 = load i32, i32* @Z, align 4 |
31 br label %return | 31 br label %return |
32 | 32 |
33 return: | 33 return: |
34 ret void | 34 ret void |
35 } | 35 } |
50 %0 = phi i32* [ %arrayidx13, %for.body ], [ %j, %entry ] | 50 %0 = phi i32* [ %arrayidx13, %for.body ], [ %j, %entry ] |
51 %targetBlock = call i1 @cond(i32* %jj7) | 51 %targetBlock = call i1 @cond(i32* %jj7) |
52 br i1 %targetBlock, label %for.body, label %bye | 52 br i1 %targetBlock, label %for.body, label %bye |
53 | 53 |
54 for.body: | 54 for.body: |
55 %1 = load i32* %jj7, align 4 | 55 %1 = load i32, i32* %jj7, align 4 |
56 %idxprom4 = zext i32 %1 to i64 | 56 %idxprom4 = zext i32 %1 to i64 |
57 %arrayidx5 = getelementptr inbounds [100 x i32]* %oa5, i64 0, i64 %idxprom4 | 57 %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %oa5, i64 0, i64 %idxprom4 |
58 %2 = load i32* %arrayidx5, align 4 | 58 %2 = load i32, i32* %arrayidx5, align 4 |
59 %sub6 = sub i32 %2, 6 | 59 %sub6 = sub i32 %2, 6 |
60 store i32 %sub6, i32* %arrayidx5, align 4 | 60 store i32 %sub6, i32* %arrayidx5, align 4 |
61 ; %0 and %arrayidx5 can alias! It is not safe to DSE the above store. | 61 ; %0 and %arrayidx5 can alias! It is not safe to DSE the above store. |
62 %3 = load i32* %0, align 4 | 62 %3 = load i32, i32* %0, align 4 |
63 store i32 %3, i32* %arrayidx5, align 4 | 63 store i32 %3, i32* %arrayidx5, align 4 |
64 %sub11 = add i32 %1, -1 | 64 %sub11 = add i32 %1, -1 |
65 %idxprom12 = zext i32 %sub11 to i64 | 65 %idxprom12 = zext i32 %sub11 to i64 |
66 %arrayidx13 = getelementptr inbounds [100 x i32]* %oa5, i64 0, i64 %idxprom12 | 66 %arrayidx13 = getelementptr inbounds [100 x i32], [100 x i32]* %oa5, i64 0, i64 %idxprom12 |
67 call void @inc(i32* %jj7) | 67 call void @inc(i32* %jj7) |
68 br label %codeRepl | 68 br label %codeRepl |
69 | 69 |
70 bye: | 70 bye: |
71 %.reload = load i32* %jj7, align 4 | 71 %.reload = load i32, i32* %jj7, align 4 |
72 ret i32 %.reload | 72 ret i32 %.reload |
73 } | 73 } |
74 | 74 |
75 declare i1 @cond(i32*) | 75 declare i1 @cond(i32*) |
76 | 76 |