blob: 13f1a1166e68e3c20e32aa16a6bbc7285ce6045b [file] [log] [blame]
Reid Spencera4987472005-04-25 02:50:08 +00001; Test that the ExitInMainOptimization pass works correctly
Reid Spencer894cfff2007-04-15 05:16:38 +00002; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
3; RUN: grep -c {ret i32 3} | grep 1
4; END.
Reid Spencera4987472005-04-25 02:50:08 +00005
Reid Spencer5517b2b2005-04-25 03:18:19 +00006declare void %exit(int)
7declare void %exitonly(int)
Reid Spencera4987472005-04-25 02:50:08 +00008
9implementation ; Functions:
10
Reid Spencer5517b2b2005-04-25 03:18:19 +000011int %main () {
12 call void %exitonly ( int 3 )
13 call void %exit ( int 3 )
Reid Spencera4987472005-04-25 02:50:08 +000014 ret int 0
15}