Test the noreturn function optimization

llvm-svn: 21586
This commit is contained in:
Chris Lattner 2005-04-27 04:51:01 +00:00
parent a21f83f809
commit 356cbfef73
1 changed files with 16 additions and 0 deletions

View 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!
}