Combine these two tests, and make sure there's a newline at the end of the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112554 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2010-08-30 23:37:41 +00:00
parent a081d15b84
commit 985185ea75
2 changed files with 19 additions and 21 deletions

View File

@ -1,9 +1,24 @@
; RUN: opt < %s -value-propagation -S | FileCheck %s
; PR4420
; PR2581
; CHECK: @test1
define i32 @test1(i1 %C) nounwind {
br i1 %C, label %exit, label %body
body: ; preds = %0
; CHECK-NOT: select
%A = select i1 %C, i32 10, i32 11 ; <i32> [#uses=1]
; CHECK: ret i32 11
ret i32 %A
exit: ; preds = %0
; CHECK: ret i32 10
ret i32 10
}
declare i1 @ext()
; CHECK: @foo
define i1 @foo() {
; CHECK: @test2
define i1 @test2() {
entry:
%cond = tail call i1 @ext() ; <i1> [#uses=2]
br i1 %cond, label %bb1, label %bb2
@ -22,4 +37,4 @@ bb3: ; preds = %bb1
%res = tail call i1 @ext() ; <i1> [#uses=1]
; CHECK: ret i1 %res
ret i1 %res
}
}

View File

@ -1,17 +0,0 @@
; RUN: opt < %s -value-propagation -S | FileCheck %s
; PR2581
; CHECK: @run
define i32 @run(i1 %C) nounwind {
br i1 %C, label %exit, label %body
body: ; preds = %0
; CHECK-NOT: select
%A = select i1 %C, i32 10, i32 11 ; <i32> [#uses=1]
; CHECK: ret i32 11
ret i32 %A
exit: ; preds = %0
; CHECK: ret i32 10
ret i32 10
}