Remove a few tests which no longer hold for deadargelim (since it is now
[oota-llvm.git] / test / Transforms / Inline / invoke_test-3.ll
1 ; Test that any rethrown exceptions in an inlined function are automatically
2 ; turned into branches to the invoke destination.
3
4 ; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep unwind$
5
6 declare void @might_throw()
7
8 define internal i32 @callee() {
9         invoke void @might_throw( )
10                         to label %cont unwind label %exc
11
12 cont:           ; preds = %0
13         ret i32 0
14
15 exc:            ; preds = %0a
16        ; This just rethrows the exception!
17         unwind
18 }
19
20 ; caller returns true if might_throw throws an exception... which gets
21 ; propagated by callee.
22 define i32 @caller() {
23         %X = invoke i32 @callee( )
24                         to label %cont unwind label %Handler            ; <i32> [#uses=1]
25
26 cont:           ; preds = %0
27         ret i32 %X
28
29 Handler:                ; preds = %0
30 ; This consumes an exception thrown by might_throw
31         ret i32 1
32 }