blob: 73dc3cfb153e3f6dd9420eab618918ed46fdc0da [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()
Chris Lattnercd98c722003-08-24 17:58:24 +00009
10int %test() {
11 invoke void %bar() to label %Ok except label %Rethrow
12Ok:
13 ret int 0
14Rethrow:
Chris Lattnerf3804452004-07-01 04:09:14 +000015 unwind
Chris Lattnercd98c722003-08-24 17:58:24 +000016}
17