1; RUN: opt -inline < %s -S -o - -inline-threshold=100 | FileCheck %s
2
3target datalayout = "p:32:32"
4
5@glbl = external global i32
6
7declare void @f()
8declare i32 @__gxx_personality_v0(...)
9declare i8* @__cxa_begin_catch(i8*)
10declare void @__cxa_end_catch()
11declare void @_ZSt9terminatev()
12
13define void @inner1() {
14entry:
15  invoke void @f() to label %cont1 unwind label %terminate.lpad
16
17cont1:
18  invoke void @f() to label %cont2 unwind label %terminate.lpad
19
20cont2:
21  invoke void @f() to label %cont3 unwind label %terminate.lpad
22
23cont3:
24  invoke void @f() to label %cont4 unwind label %terminate.lpad
25
26cont4:
27  ret void
28
29terminate.lpad:
30  landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
31            catch i8* null
32  call void @_ZSt9terminatev() noreturn nounwind
33  unreachable
34}
35
36define void @outer1() {
37; CHECK-LABEL: @outer1(
38;
39; This call should not get inlined because inner1 actually calls a function
40; many times, but it only does so through invoke as opposed to call.
41;
42; CHECK: call void @inner1
43  call void @inner1()
44  ret void
45}
46