1 ; RUN: opt -inline < %s -S -o - -inline-threshold=100 | FileCheck %s
2 ; RUN: opt -passes='cgscc(inline)' < %s -S -o - -inline-threshold=100 | FileCheck %s
4 target datalayout = "p:32:32"
6 @glbl = external global i32
9 declare i32 @__gxx_personality_v0(...)
10 declare i8* @__cxa_begin_catch(i8*)
11 declare void @__cxa_end_catch()
12 declare void @_ZSt9terminatev()
14 define void @inner1() personality i32 (...)* @__gxx_personality_v0 {
16 invoke void @f() to label %cont1 unwind label %terminate.lpad
19 invoke void @f() to label %cont2 unwind label %terminate.lpad
22 invoke void @f() to label %cont3 unwind label %terminate.lpad
25 invoke void @f() to label %cont4 unwind label %terminate.lpad
33 call void @_ZSt9terminatev() noreturn nounwind
37 define void @outer1() {
38 ; CHECK-LABEL: @outer1(
40 ; This call should not get inlined because inner1 actually calls a function
41 ; many times, but it only does so through invoke as opposed to call.
43 ; CHECK: call void @inner1