1 ; Test that if an invoked function is inlined, and if that function cannot
2 ; throw, that the dead handler is now unreachable.
4 ; RUN: llvm-as < %s | opt -inline -simplifycfg | llvm-dis | \
5 ; RUN: not grep UnreachableExceptionHandler
7 declare void @might_throw()
9 define internal i32 @callee() {
10 invoke void @might_throw( )
11 to label %cont unwind label %exc
20 ; caller returns true if might_throw throws an exception... callee cannot throw.
21 define i32 @caller() {
22 %X = invoke i32 @callee( )
23 to label %cont unwind label %UnreachableExceptionHandler ; <i32> [#uses=1]
28 UnreachableExceptionHandler: ; preds = %0