blob: 3fded2cc070e62dab1c9c9d0650e9bcf8ee6c569 [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 | \
Dan Gohman43c3db32007-08-15 13:49:33 +00003; RUN: grep {ret i32 3} | count 1
Reid Spencer894cfff2007-04-15 05:16:38 +00004; 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}