blob: 29f69d198a3cb361f245f00feb4e6d258e65da59 [file] [log] [blame]
Reid Spencera4987472005-04-25 02:50:08 +00001; Test that the ExitInMainOptimization pass works correctly
2; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep -c 'ret int 3' | grep 1
3
Reid Spencer5517b2b2005-04-25 03:18:19 +00004declare void %exit(int)
5declare void %exitonly(int)
Reid Spencera4987472005-04-25 02:50:08 +00006
7implementation ; Functions:
8
Reid Spencer5517b2b2005-04-25 03:18:19 +00009int %main () {
10 call void %exitonly ( int 3 )
11 call void %exit ( int 3 )
Reid Spencera4987472005-04-25 02:50:08 +000012 ret int 0
13}