Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; This testcase checks to see if the simplifycfg pass is converting invoke |
| 2 | ; instructions to call instructions if the handler just rethrows the exception. |
| 3 | |
| 4 | ; If this test is successful, the function should be reduced to 'call; ret' |
| 5 | |
| 6 | ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ |
| 7 | ; RUN: not egrep {\\(invoke\\)|\\(br\\)} |
| 8 | |
| 9 | declare void %bar() |
| 10 | |
| 11 | int %test() { |
| 12 | invoke void %bar() to label %Ok except label %Rethrow |
| 13 | Ok: |
| 14 | ret int 0 |
| 15 | Rethrow: |
| 16 | unwind |
| 17 | } |
| 18 | |