2005-04-25 02:50:08 +00:00
|
|
|
; Test that the ExitInMainOptimization pass works correctly
|
2008-03-10 07:21:50 +00:00
|
|
|
; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
|
2007-08-15 13:49:33 +00:00
|
|
|
; RUN: grep {ret i32 3} | count 1
|
2007-04-15 05:16:38 +00:00
|
|
|
; END.
|
2005-04-25 02:50:08 +00:00
|
|
|
|
2008-03-10 07:21:50 +00:00
|
|
|
declare void @exit(i32)
|
2005-04-25 02:50:08 +00:00
|
|
|
|
2008-03-10 07:21:50 +00:00
|
|
|
declare void @exitonly(i32)
|
2005-04-25 02:50:08 +00:00
|
|
|
|
2008-03-10 07:21:50 +00:00
|
|
|
define i32 @main() {
|
|
|
|
call void @exitonly( i32 3 )
|
|
|
|
call void @exit( i32 3 )
|
|
|
|
ret i32 0
|
2005-04-25 02:50:08 +00:00
|
|
|
}
|
2008-03-10 07:21:50 +00:00
|
|
|
|