1 ; Test behavior when inlining policy grows size out of control.
2 ; In all cases, the end result is the same: mandatory inlinings must happen.
3 ; However, when we discover we 'trip' over the artificially-low size increase
4 ; factor, we don't inline anymore.
5 ; REQUIRES: have_tf_aot
6 ; RUN: opt -passes=scc-oz-module-inliner -enable-ml-inliner=release -ml-advisor-size-increase-threshold=10.0 -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=NOBOUNDS
7 ; RUN: opt -passes=scc-oz-module-inliner -enable-ml-inliner=release -ml-advisor-size-increase-threshold=1.0 -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=BOUNDS
9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
10 target triple = "x86_64-grtev4-linux-gnu"
20 define i64 @some_function() {
28 %r2 = call i64 @some_function()
33 attributes #0 = { alwaysinline }
36 ; f2 must always be inlined, so we won't find a call to it in @top()
37 ; CHECK-NOT: call i64 @f2
38 ; @some-function isn't mandatory, and when we set the increase threshold too low,
39 ; it won't be inlined.
40 ; NOBOUNDS-NOT: @some_function
41 ; BOUNDS: call i64 @some_function