blob: 7a2c4a6fa79b806f199c6d0bc0b531f435499b4d [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
6; RUN: as < %s | opt -simplifycfg | dis | not egrep 'invoke|br'
7
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