make these tests a bit less fragile

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121682 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-12-13 05:10:30 +00:00
parent 97fdb898f5
commit c232a2e559
2 changed files with 6 additions and 12 deletions

View File

@ -3,8 +3,7 @@
; RUN: opt < %s -simplifycfg -S | FileCheck %s
define void @test1() {
br label %BB1
BB1: ; preds = %0
br label %1
ret void
; CHECK: @test1
; CHECK-NEXT: ret void
@ -12,7 +11,6 @@ BB1: ; preds = %0
define void @test2() {
ret void
BB1: ; No predecessors!
ret void
; CHECK: @test2
; CHECK-NEXT: ret void
@ -20,8 +18,7 @@ BB1: ; No predecessors!
}
define void @test3(i1 %T) {
br i1 %T, label %BB1, label %BB1
BB1: ; preds = %0, %0
br i1 %T, label %1, label %1
ret void
; CHECK: @test3
; CHECK-NEXT: ret void
@ -41,14 +38,12 @@ return:
; PR5795
define void @test5(i32 %A) {
switch i32 %A, label %return [
i32 2, label %bb
i32 10, label %bb1
i32 2, label %1
i32 10, label %2
]
bb: ; preds = %entry
ret void
bb1: ; preds = %entry
ret void
return: ; preds = %entry

View File

@ -9,10 +9,9 @@ define i32 @test1() {
; CHECK-NEXT: call void @bar()
; CHECK-NEXT: ret i32 0
invoke void @bar( )
to label %Ok unwind label %Rethrow
Ok: ; preds = %0
to label %1 unwind label %Rethrow
ret i32 0
Rethrow: ; preds = %0
Rethrow:
unwind
}