Chris Lattner | cd98c72 | 2003-08-24 17:58:24 +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: as < %s | opt -simplifycfg | dis | not egrep 'invoke|br' |
| 7 | |
| 8 | declare void %bar() |
| 9 | declare void %llvm.unwind() |
| 10 | |
| 11 | int %test() { |
| 12 | invoke void %bar() to label %Ok except label %Rethrow |
| 13 | Ok: |
| 14 | ret int 0 |
| 15 | Rethrow: |
| 16 | call void %llvm.unwind() |
| 17 | br label %Ok |
| 18 | } |
| 19 | |