Move the personality function from LandingPadInst to Function
[oota-llvm.git] / test / Transforms / SCCP / 2009-01-14-IPSCCP-Invoke.ll
1 ; RUN: opt < %s -ipsccp -S | grep "ret i32 42"
2 ; RUN: opt < %s -ipsccp -S | grep "ret i32 undef"
3 ; PR3325
4
5 define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
6         %tmp1 = invoke i32 @f()
7                         to label %UnifiedReturnBlock unwind label %lpad
8
9 lpad:
10         %val = landingpad { i8*, i32 }
11                  cleanup
12         unreachable
13
14 UnifiedReturnBlock:
15         ret i32 %tmp1
16 }
17
18 define internal i32 @f() {
19        ret i32 42
20 }
21
22 declare i8* @__cxa_begin_catch(i8*) nounwind
23
24 declare void @__cxa_end_catch()
25
26 declare i32 @__gxx_personality_v0(...)