llvm.org GIT mirror llvm / 571c15c
more test cleanup git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112892 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 9 years ago
4 changed file(s) with 4 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
33
44 ; RUN: opt < %s -globalopt -S > %t
55 ; Check that the new global values still have their address space
6 ; RUN: cat %t | grep global.*addrspace
6 ; RUN: cat %t | grep addrspace.*global
77
88 @struct = internal addrspace(1) global { i32, i32 } zeroinitializer
99 @array = internal addrspace(1) global [ 2 x i32 ] zeroinitializer
2020 entry:
2121 %0 = getelementptr %struct.MYstr* %u, i32 0, i32 1 ; [#uses=1]
2222 %1 = load i32* %0
23 ; CHECK: load i32* getelementptr inbounds (%struct.MYstr* @mystr, i32 0, i32 1) ; [#uses=1]
23 ; CHECK: load i32* getelementptr inbounds (%struct.MYstr* @mystr, i32 0, i32 1)
2424 %2 = getelementptr %struct.MYstr* %u, i32 0, i32 0 ; [#uses=1]
2525 %3 = load i8* %2
26 ; CHECK: load i8* getelementptr inbounds (%struct.MYstr* @mystr, i32 0, i32 0) ; [#uses=1]
26 ; CHECK: load i8* getelementptr inbounds (%struct.MYstr* @mystr, i32 0, i32 0)
2727 %4 = zext i8 %3 to i32
2828 %5 = add i32 %4, %1
2929 ret i32 %5
+0
-24
test/Transforms/IndVarSimplify/2003-12-10-IndVarDeadCode.ll less more
None ; The induction variable canonicalization pass shouldn't leave dead
1 ; instructions laying around!
2 ;
3 ; RUN: opt < %s -indvars -S | grep {#uses=0} | count 1
4
5 define i32 @mul(i32 %x, i32 %y) {
6 entry:
7 br label %tailrecurse
8
9 tailrecurse: ; preds = %endif, %entry
10 %accumulator.tr = phi i32 [ %x, %entry ], [ %tmp.9, %endif ] ; [#uses=2]
11 %y.tr = phi i32 [ %y, %entry ], [ %tmp.8, %endif ] ; [#uses=2]
12 %tmp.1 = icmp eq i32 %y.tr, 0 ; [#uses=1]
13 br i1 %tmp.1, label %return, label %endif
14
15 endif: ; preds = %tailrecurse
16 %tmp.8 = add i32 %y.tr, -1 ; [#uses=1]
17 %tmp.9 = add i32 %accumulator.tr, %x ; [#uses=1]
18 br label %tailrecurse
19
20 return: ; preds = %tailrecurse
21 ret i32 %accumulator.tr
22 }
23
None ; RUN: opt < %s -instcombine -S | grep {= or i32 %x, -5 }
0 ; RUN: opt < %s -instcombine -S | grep {= or i32 %x, -5}
11
22 @.str = internal constant [5 x i8] c"foo\0A\00" ; <[5 x i8]*> [#uses=1]
33 @.str1 = internal constant [5 x i8] c"bar\0A\00" ; <[5 x i8]*> [#uses=1]