more test cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112892 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-09-02 22:38:56 +00:00
parent 042ff0358d
commit 571c15c6de
4 changed files with 4 additions and 28 deletions

View File

@ -4,7 +4,7 @@
; RUN: opt < %s -globalopt -S > %t
; Check that the new global values still have their address space
; RUN: cat %t | grep global.*addrspace
; RUN: cat %t | grep addrspace.*global
@struct = internal addrspace(1) global { i32, i32 } zeroinitializer
@array = internal addrspace(1) global [ 2 x i32 ] zeroinitializer

View File

@ -21,10 +21,10 @@ define internal i32 @vfu2(%struct.MYstr* byval align 4 %u) nounwind readonly {
entry:
%0 = getelementptr %struct.MYstr* %u, i32 0, i32 1 ; <i32*> [#uses=1]
%1 = load i32* %0
; CHECK: load i32* getelementptr inbounds (%struct.MYstr* @mystr, i32 0, i32 1) ; <i32> [#uses=1]
; CHECK: load i32* getelementptr inbounds (%struct.MYstr* @mystr, i32 0, i32 1)
%2 = getelementptr %struct.MYstr* %u, i32 0, i32 0 ; <i8*> [#uses=1]
%3 = load i8* %2
; CHECK: load i8* getelementptr inbounds (%struct.MYstr* @mystr, i32 0, i32 0) ; <i8> [#uses=1]
; CHECK: load i8* getelementptr inbounds (%struct.MYstr* @mystr, i32 0, i32 0)
%4 = zext i8 %3 to i32
%5 = add i32 %4, %1
ret i32 %5

View File

@ -1,24 +0,0 @@
; The induction variable canonicalization pass shouldn't leave dead
; instructions laying around!
;
; RUN: opt < %s -indvars -S | grep {#uses=0} | count 1
define i32 @mul(i32 %x, i32 %y) {
entry:
br label %tailrecurse
tailrecurse: ; preds = %endif, %entry
%accumulator.tr = phi i32 [ %x, %entry ], [ %tmp.9, %endif ] ; <i32> [#uses=2]
%y.tr = phi i32 [ %y, %entry ], [ %tmp.8, %endif ] ; <i32> [#uses=2]
%tmp.1 = icmp eq i32 %y.tr, 0 ; <i1> [#uses=1]
br i1 %tmp.1, label %return, label %endif
endif: ; preds = %tailrecurse
%tmp.8 = add i32 %y.tr, -1 ; <i32> [#uses=1]
%tmp.9 = add i32 %accumulator.tr, %x ; <i32> [#uses=1]
br label %tailrecurse
return: ; preds = %tailrecurse
ret i32 %accumulator.tr
}

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -instcombine -S | grep {= or i32 %x, -5 }
; RUN: opt < %s -instcombine -S | grep {= or i32 %x, -5}
@.str = internal constant [5 x i8] c"foo\0A\00" ; <[5 x i8]*> [#uses=1]
@.str1 = internal constant [5 x i8] c"bar\0A\00" ; <[5 x i8]*> [#uses=1]