blob: 49a27e195e2a74e436355844a2e82f490cacc751 [file] [log] [blame]
Dan Gohman3c7d3082009-09-11 18:01:28 +00001; RUN: opt < %s -inline -disable-output
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00003declare i32 @External()
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00005define internal i32 @Callee() {
6 %I = call i32 @External( ) ; <i32> [#uses=2]
7 %J = add i32 %I, %I ; <i32> [#uses=1]
8 ret i32 %J
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009}
10
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000011define i32 @Caller() {
12 %V = invoke i32 @Callee( )
13 to label %Ok unwind label %Bad ; <i32> [#uses=1]
14
15Ok: ; preds = %0
16 ret i32 %V
17
18Bad: ; preds = %0
19 ret i32 0
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020}
21