mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
f04d8d1593
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48483 91177308-0d34-0410-b5e6-96231b3b80d8
34 lines
776 B
LLVM
34 lines
776 B
LLVM
; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep unreachable
|
|
|
|
define void @test1(i1 %C, i1* %BP) {
|
|
br i1 %C, label %T, label %F
|
|
T: ; preds = %0
|
|
store i1 %C, i1* %BP
|
|
unreachable
|
|
F: ; preds = %0
|
|
ret void
|
|
}
|
|
|
|
define void @test2() {
|
|
invoke void @test2( )
|
|
to label %N unwind label %U
|
|
U: ; preds = %0
|
|
unreachable
|
|
N: ; preds = %0
|
|
ret void
|
|
}
|
|
|
|
define i32 @test3(i32 %v) {
|
|
switch i32 %v, label %default [
|
|
i32 1, label %U
|
|
i32 2, label %T
|
|
]
|
|
default: ; preds = %0
|
|
ret i32 1
|
|
U: ; preds = %0
|
|
unreachable
|
|
T: ; preds = %0
|
|
ret i32 2
|
|
}
|
|
|