41 lines · plain
1; RUN: opt -S -passes=callsite-splitting < %s | FileCheck %s2;3; Make sure that the callsite is not splitted by checking that there's only one4; call to @callee.5 6; CHECK-LABEL: @caller7; CHECK-LABEL: lpad8; CHECK: call void @callee9; CHECK-NOT: call void @callee10 11declare void @foo(ptr %p);12declare void @bar(ptr %p);13declare dso_local i32 @__gxx_personality_v0(...)14 15define void @caller(ptr %p) personality ptr @__gxx_personality_v0 {16entry:17 %0 = icmp eq ptr %p, null18 br i1 %0, label %bb1, label %bb219 20bb1:21 invoke void @foo(ptr %p) to label %end1 unwind label %lpad22 23bb2:24 invoke void @bar(ptr %p) to label %end2 unwind label %lpad25 26lpad:27 %1 = landingpad { ptr, i32 } cleanup28 call void @callee(ptr %p)29 resume { ptr, i32 } %130 31end1:32 ret void33 34end2:35 ret void36}37 38define internal void @callee(ptr %p) {39 ret void40}41