brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 1159603 Raw
47 lines · plain
1; RUN: opt -passes=inline < %s -S -o - -inline-threshold=100 | FileCheck %s2; RUN: opt -passes='cgscc(inline)' < %s -S -o - -inline-threshold=100 | FileCheck %s3 4target datalayout = "p:32:32"5 6@glbl = external global i327 8declare void @f()9declare i32 @__gxx_personality_v0(...)10declare ptr @__cxa_begin_catch(ptr)11declare void @__cxa_end_catch()12declare void @_ZSt9terminatev()13 14define void @inner1() personality ptr @__gxx_personality_v0 {15entry:16  invoke void @f() to label %cont1 unwind label %terminate.lpad17 18cont1:19  invoke void @f() to label %cont2 unwind label %terminate.lpad20 21cont2:22  invoke void @f() to label %cont3 unwind label %terminate.lpad23 24cont3:25  invoke void @f() to label %cont4 unwind label %terminate.lpad26 27cont4:28  ret void29 30terminate.lpad:31  landingpad {ptr, i32}32            catch ptr null33  call void @_ZSt9terminatev() noreturn nounwind34  unreachable35}36 37define void @outer1() {38; CHECK-LABEL: @outer1(39;40; This call should not get inlined because inner1 actually calls a function41; many times, but it only does so through invoke as opposed to call.42;43; CHECK: call void @inner144  call void @inner1()45  ret void46}47