brintos

brintos / llvm-project-archived public Read only

0
0
Text · 840 B · 742bd25 Raw
33 lines · plain
1; RUN: opt -passes=inline -S < %s | FileCheck %s2 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 void9}10 11define internal void @f2(ptr %p) {12  call void %p(ptr @f2)13  call void %p(ptr @f2)14  ret void15}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 void22;23  call void @a()24  ret void25}26 27define internal void @a() {28  call void @f1(ptr @f2)29  ret void30}31 32; CHECK: [[NOINLINE]] = { noinline }33