blob: 0f14ec82eb25ff926873b4b26c50df477dc7d776 [file] [log] [blame]
Chris Lattnercd98c722003-08-24 17:58:24 +00001; 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
Misha Brukmane78760e2003-09-16 15:29:54 +00006; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not egrep 'invoke|br'
Chris Lattnercd98c722003-08-24 17:58:24 +00007
8declare void %bar()
9declare void %llvm.unwind()
10
11int %test() {
12 invoke void %bar() to label %Ok except label %Rethrow
13Ok:
14 ret int 0
15Rethrow:
16 call void %llvm.unwind()
17 br label %Ok
18}
19