xref: /llvm-project/llvm/test/Transforms/Inline/ML/fpi-update.ll (revision 7e7021ca1a8f8b7621832c84745793206573b301)
1target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2target triple = "x86_64-grtev4-linux-gnu"
3
4; TODO: we could instantiate the MLInliner with a non-model generated evaluator
5; and drop the requirement
6; REQUIRES: llvm_inliner_model_autogenerated
7
8; RUN: opt -enable-ml-inliner=release -passes='scc-oz-module-inliner,print<inline-advisor>' \
9; RUN:     -keep-inline-advisor-for-printing -max-devirt-iterations=0 \
10; RUN:     -mandatory-inlining-first=0 -S < %s 2>&1 | FileCheck %s
11
12define void @caller(i32 %i) #1 {
13  call void @callee(i32 %i)
14  ret void
15}
16
17define void @callee(i32 %i) #0 {
18entry:
19  br label %loop
20loop:
21  %cond = icmp slt i32 %i, 0
22  br i1 %cond, label %loop, label %exit
23exit:
24  ret void
25}
26
27attributes #0 = { alwaysinline }
28attributes #1 = { noinline optnone }
29
30; CHECK: [MLInlineAdvisor] FPI:
31; CHECK: caller:
32; CHECK: MaxLoopDepth: 1
33