Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; Test that the ExitInMainOptimization pass works correctly |
| 2 | ; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ |
Dan Gohman | 552fb26 | 2007-08-15 13:49:33 +0000 | [diff] [blame] | 3 | ; RUN: grep {ret i32 3} | count 1 |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 4 | ; END. |
| 5 | |
| 6 | declare void %exit(int) |
| 7 | declare void %exitonly(int) |
| 8 | |
| 9 | implementation ; Functions: |
| 10 | |
| 11 | int %main () { |
| 12 | call void %exitonly ( int 3 ) |
| 13 | call void %exit ( int 3 ) |
| 14 | ret int 0 |
| 15 | } |