llvm.org GIT mirror llvm / fa0e664
The functionality being tested was removed because it was horribly unsafe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49610 91177308-0d34-0410-b5e6-96231b3b80d8 Owen Anderson 12 years ago
2 changed file(s) with 33 addition(s) and 33 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -basicaa -gvn | llvm-dis | grep TestConst | count 2
1 ; RUN: llvm-as < %s | opt -basicaa -gvn | llvm-dis | grep TestPure | count 4
2 ; RUN: llvm-as < %s | opt -basicaa -gvn | llvm-dis | grep TestNone | count 4
3 @g = global i32 0 ; [#uses=1]
4
5 define i32 @test() {
6 entry:
7 %tmp0 = call i32 @TestConst( i32 5 ) readnone ; [#uses=1]
8 %tmp1 = call i32 @TestPure( i32 6 ) readonly ; [#uses=1]
9 %tmp2 = call i32 @TestNone( i32 7 ) ; [#uses=1]
10 store i32 1, i32* @g
11 %tmp3 = call i32 @TestConst( i32 5 ) readnone ; [#uses=1]
12 %tmp4 = call i32 @TestConst( i32 5 ) readnone ; [#uses=1]
13 %tmp5 = call i32 @TestPure( i32 6 ) readonly ; [#uses=1]
14 %tmp6 = call i32 @TestPure( i32 6 ) readonly ; [#uses=1]
15 %tmp7 = call i32 @TestNone( i32 7 ) ; [#uses=1]
16 %tmp8 = call i32 @TestNone( i32 7 ) ; [#uses=1]
17 %sum0 = add i32 %tmp0, %tmp1 ; [#uses=1]
18 %sum1 = add i32 %sum0, %tmp2 ; [#uses=1]
19 %sum2 = add i32 %sum1, %tmp3 ; [#uses=1]
20 %sum3 = add i32 %sum2, %tmp4 ; [#uses=1]
21 %sum4 = add i32 %sum3, %tmp5 ; [#uses=1]
22 %sum5 = add i32 %sum4, %tmp6 ; [#uses=1]
23 %sum6 = add i32 %sum5, %tmp7 ; [#uses=1]
24 %sum7 = add i32 %sum6, %tmp8 ; [#uses=1]
25 ret i32 %sum7
26 }
27
28 declare i32 @TestConst(i32) readnone
29
30 declare i32 @TestPure(i32) readonly
31
32 declare i32 @TestNone(i32)
+0
-33
test/Analysis/BasicAA/pure-const-dce.ll less more
None ; RUN: llvm-as < %s | opt -basicaa -gvn | llvm-dis | grep TestConst | count 2
1 ; RUN: llvm-as < %s | opt -basicaa -gvn | llvm-dis | grep TestPure | count 3
2 ; RUN: llvm-as < %s | opt -basicaa -gvn | llvm-dis | grep TestNone | count 4
3 @g = global i32 0 ; [#uses=1]
4
5 define i32 @test() {
6 entry:
7 %tmp0 = call i32 @TestConst( i32 5 ) readnone ; [#uses=1]
8 %tmp1 = call i32 @TestPure( i32 6 ) readonly ; [#uses=1]
9 %tmp2 = call i32 @TestNone( i32 7 ) ; [#uses=1]
10 store i32 1, i32* @g
11 %tmp3 = call i32 @TestConst( i32 5 ) readnone ; [#uses=1]
12 %tmp4 = call i32 @TestConst( i32 5 ) readnone ; [#uses=1]
13 %tmp5 = call i32 @TestPure( i32 6 ) readonly ; [#uses=1]
14 %tmp6 = call i32 @TestPure( i32 6 ) readonly ; [#uses=1]
15 %tmp7 = call i32 @TestNone( i32 7 ) ; [#uses=1]
16 %tmp8 = call i32 @TestNone( i32 7 ) ; [#uses=1]
17 %sum0 = add i32 %tmp0, %tmp1 ; [#uses=1]
18 %sum1 = add i32 %sum0, %tmp2 ; [#uses=1]
19 %sum2 = add i32 %sum1, %tmp3 ; [#uses=1]
20 %sum3 = add i32 %sum2, %tmp4 ; [#uses=1]
21 %sum4 = add i32 %sum3, %tmp5 ; [#uses=1]
22 %sum5 = add i32 %sum4, %tmp6 ; [#uses=1]
23 %sum6 = add i32 %sum5, %tmp7 ; [#uses=1]
24 %sum7 = add i32 %sum6, %tmp8 ; [#uses=1]
25 ret i32 %sum7
26 }
27
28 declare i32 @TestConst(i32) readnone
29
30 declare i32 @TestPure(i32) readonly
31
32 declare i32 @TestNone(i32)