mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17115 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f405d107d8
commit
d7e30973cd
29
test/Transforms/SimplifyCFG/UnreachableEliminate.ll
Normal file
29
test/Transforms/SimplifyCFG/UnreachableEliminate.ll
Normal file
@ -0,0 +1,29 @@
|
||||
; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep unreachable
|
||||
|
||||
void %test1(bool %C, bool* %BP) {
|
||||
br bool %C, label %T, label %F
|
||||
T:
|
||||
store bool %C, bool* %BP ;; dead
|
||||
unreachable
|
||||
F:
|
||||
ret void
|
||||
}
|
||||
|
||||
void %test2() {
|
||||
invoke void %test2() to label %N unwind label %U
|
||||
U:
|
||||
unreachable
|
||||
N:
|
||||
ret void
|
||||
}
|
||||
|
||||
int %test3(int %v) {
|
||||
switch int %v, label %default [ int 1, label %U
|
||||
int 2, label %T]
|
||||
default:
|
||||
ret int 1
|
||||
U:
|
||||
unreachable
|
||||
T:
|
||||
ret int 2
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user