mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 22:43:29 +00:00
Test the noreturn function optimization
llvm-svn: 21586
This commit is contained in:
parent
2f676b4fd8
commit
229735db58
16
test/Regression/Transforms/PruneEH/simplenoreturntest.ll
Normal file
16
test/Regression/Transforms/PruneEH/simplenoreturntest.ll
Normal file
@ -0,0 +1,16 @@
|
||||
; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep 'ret int'
|
||||
|
||||
void %noreturn() {
|
||||
unwind
|
||||
}
|
||||
|
||||
int %caller() {
|
||||
; noreturn never returns, so the ret is unreachable.
|
||||
call void %noreturn()
|
||||
ret int 17
|
||||
}
|
||||
|
||||
int %caller2() {
|
||||
%T = call int %caller()
|
||||
ret int %T ;; this is also unreachable!
|
||||
}
|
Loading…
Reference in New Issue
Block a user