blob: 89d76a8492f7b75adbbadd60037fcafead540274 [file] [log] [blame]
Chris Lattner94be3002003-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
Reid Spencera551c042007-04-15 09:21:47 +00006; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
7; RUN: not egrep {\\(invoke\\)|\\(br\\)}
Chris Lattner94be3002003-08-24 17:58:24 +00008
9declare void %bar()
Chris Lattner94be3002003-08-24 17:58:24 +000010
11int %test() {
12 invoke void %bar() to label %Ok except label %Rethrow
13Ok:
14 ret int 0
15Rethrow:
Chris Lattnereee34722004-07-01 04:09:14 +000016 unwind
Chris Lattner94be3002003-08-24 17:58:24 +000017}
18