1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 16:33:37 +01:00
llvm-mirror/test/Transforms/SimplifyCFG/basictest.ll

44 lines
704 B
LLVM
Raw Normal View History

2009-12-22 07:04:26 +01:00
; Test CFG simplify removal of branch instructions.
;
2009-12-22 07:04:26 +01:00
; RUN: opt < %s -simplifycfg -S | FileCheck %s
define void @test1() {
br label %1
ret void
2009-12-22 07:04:26 +01:00
; CHECK: @test1
; CHECK-NEXT: ret void
}
define void @test2() {
ret void
ret void
2009-12-22 07:04:26 +01:00
; CHECK: @test2
; CHECK-NEXT: ret void
; CHECK-NEXT: }
}
define void @test3(i1 %T) {
br i1 %T, label %1, label %1
ret void
2009-12-22 07:04:26 +01:00
; CHECK: @test3
; CHECK-NEXT: ret void
}
; PR5795
define void @test5(i32 %A) {
switch i32 %A, label %return [
i32 2, label %1
i32 10, label %2
]
ret void
ret void
return: ; preds = %entry
ret void
; CHECK: @test5
; CHECK-NEXT: ret void
}