mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-30 15:45:26 +00:00
merge two tests.
llvm-svn: 83751
This commit is contained in:
parent
3acb62d9ea
commit
dedd4ca17b
@ -6,7 +6,9 @@ declare i32 @f1()
|
||||
declare i32 @f2()
|
||||
declare void @f3()
|
||||
|
||||
define i32 @test(i1 %cond) {
|
||||
define i32 @test1(i1 %cond) {
|
||||
; CHECK: @test1
|
||||
|
||||
br i1 %cond, label %T1, label %F1
|
||||
|
||||
T1:
|
||||
@ -37,6 +39,7 @@ F2:
|
||||
|
||||
;; cond is known false on Entry -> F1 edge!
|
||||
define i32 @test2(i1 %cond) {
|
||||
; CHECK: @test2
|
||||
Entry:
|
||||
br i1 %cond, label %T1, label %F1
|
||||
|
||||
@ -57,3 +60,18 @@ F2:
|
||||
call void @f3()
|
||||
ret i32 12
|
||||
}
|
||||
|
||||
|
||||
; Undef handling.
|
||||
define i32 @test3(i1 %cond) {
|
||||
; CHECK: @test3
|
||||
; CHECK-NEXT: T1:
|
||||
; CHECK-NEXT: ret i32 42
|
||||
br i1 undef, label %T1, label %F1
|
||||
|
||||
T1:
|
||||
ret i32 42
|
||||
|
||||
F1:
|
||||
ret i32 17
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
; RUN: opt < %s -jump-threading -S | not grep {br }
|
||||
; RUN: opt < %s -jump-threading -S | grep {ret i32} | count 1
|
||||
|
||||
define i32 @test(i1 %cond) {
|
||||
br i1 undef, label %T1, label %F1
|
||||
|
||||
T1:
|
||||
ret i32 42
|
||||
|
||||
F1:
|
||||
ret i32 17
|
||||
}
|
Loading…
Reference in New Issue
Block a user