merge test into shift.ll, this also eliminates awful grepping on -stats output

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83802 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-10-11 22:39:58 +00:00
parent 490ff6310a
commit 90d4f3a077
2 changed files with 34 additions and 29 deletions

View File

@ -309,3 +309,37 @@ define i1 @test27(i32 %x) nounwind {
ret i1 %z ret i1 %z
} }
define i8 @test28(i8 %x) {
entry:
; CHECK: @test28
; CHECK: icmp slt i8 %x, 0
; CHECK-NEXT: br i1
%tmp1 = lshr i8 %x, 7
%cond1 = icmp ne i8 %tmp1, 0
br i1 %cond1, label %bb1, label %bb2
bb1:
ret i8 0
bb2:
ret i8 1
}
define i8 @test28a(i8 %x, i8 %y) {
entry:
; This shouldn't be transformed.
; CHECK: @test28a
; CHECK: %tmp1 = lshr i8 %x, 7
; CHECK: %cond1 = icmp eq i8 %tmp1, 0
; CHECK: br i1 %cond1, label %bb2, label %bb1
%tmp1 = lshr i8 %x, 7
%cond1 = icmp ne i8 %tmp1, 0
br i1 %cond1, label %bb1, label %bb2
bb1:
ret i8 %tmp1
bb2:
%tmp2 = add i8 %tmp1, %y
ret i8 %tmp2
}

View File

@ -1,29 +0,0 @@
; RUN: opt < %s -instcombine -stats -disable-output |& \
; RUN: grep {Number of insts combined} | grep 5
define i8 @t1(i8 zeroext %x, i8 zeroext %y) zeroext nounwind {
entry:
%tmp1 = lshr i8 %x, 7
%cond1 = icmp ne i8 %tmp1, 0
br i1 %cond1, label %bb1, label %bb2
bb1:
ret i8 %tmp1
bb2:
%tmp2 = add i8 %tmp1, %y
ret i8 %tmp2
}
define i8 @t2(i8 zeroext %x) zeroext nounwind {
entry:
%tmp1 = lshr i8 %x, 7
%cond1 = icmp ne i8 %tmp1, 0
br i1 %cond1, label %bb1, label %bb2
bb1:
ret i8 0
bb2:
ret i8 1
}