1; RUN: opt -passes=inline -S < %s | FileCheck %s 2 3; This will inline @f1 into @a, causing two new calls to @f2, which will get inlined for two calls to @f1. 4; The inline history should stop recursive inlining here, and make sure to mark the inlined calls as noinline so we don't repeat the inlining later on when @a gets inlined into @b. 5 6define internal void @f1(ptr %p) { 7 call void %p(ptr @f1) 8 ret void 9} 10 11define internal void @f2(ptr %p) { 12 call void %p(ptr @f2) 13 call void %p(ptr @f2) 14 ret void 15} 16 17define void @b() { 18; CHECK-LABEL: define void @b() { 19; CHECK-NEXT: call void @f1(ptr @f2) #[[NOINLINE:[0-9]+]] 20; CHECK-NEXT: call void @f1(ptr @f2) #[[NOINLINE]] 21; CHECK-NEXT: ret void 22; 23 call void @a() 24 ret void 25} 26 27define internal void @a() { 28 call void @f1(ptr @f2) 29 ret void 30} 31 32; CHECK: [[NOINLINE]] = { noinline } 33