; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
; PR1335
target triple = "i686-pc-linux-gnu"
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
; 'bar' can be overridden at link-time, don't inline it.
define weak void @bar() {
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
declare i1 @extern()
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
define i32 @fn2() noinline {
; CHECK-LABEL: define i32 @fn2()
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
; Do not inline calls with variable-sized alloca.
@q = common global i8* null
; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -S -inline | FileCheck %s
+; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -S -passes='cgscc(inline)' | FileCheck %s
; Check that we only inline when we have compatible target attributes.
; X86 has implemented a target attribute that will verify that the attribute
; sets are compatible.
; RUN: opt -inline < %s -S -o - -inline-threshold=8 | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' < %s -S -o - -inline-threshold=8 | FileCheck %s
target datalayout = "p:32:32"
; RUN: opt -inline -S < %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
; struct A {
; int arg0;
; double arg1[2];
; function are moved to the top of the function they are inlined into.
;
; RUN: opt -S -inline < %s | FileCheck %s
+; RUN: opt -S -passes='cgscc(inline)' < %s | FileCheck %s
define i32 @func(i32 %i) {
%X = alloca i32
; RUN: opt -inline -S < %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
%struct.A = type { i32 }
define void @callee1(i32 %M) {
; RUN: opt -inline -S < %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
; PR10162
; Make sure doit is not inlined since the blockaddress is taken
; RUN: opt < %s -basicaa -tailcallelim -inline -instcombine -dse -S | FileCheck %s
+; RUN: opt < %s -aa-pipeline=basic-aa -passes='function(tailcallelim),cgscc(inline,function(instcombine,dse))' -S | FileCheck %s
; PR7272
; Calls that capture byval parameters cannot be marked as tail calls. Other
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
; Inlining a byval struct should cause an explicit copy into an alloca.
; RUN: opt -S -inline < %s | FileCheck %s
-; END.
+; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
; By inlining foo, an alloca is created in main to hold the byval argument, so
; a lifetime marker should be generated as well by default.
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
define i32 @testByte(i8 %X) {
entry:
; RUN: opt -inline -S < %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
define i32 @caller() {
; CHECK-LABEL: @caller(
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
; InlineFunction would assert inside the loop that leaves lifetime markers if
; there was an zero-sized AllocaInst. Check that it doesn't assert and doesn't
; RUN: opt < %s -always-inline -S | FileCheck %s
+; RUN: opt -passes='always-inline' -S < %s | FileCheck %s
; Original input generated from clang -emit-llvm -S -c -mllvm -disable-llvm-optzns
;
; RUN: opt -inline -S < %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
; PR23216: We can't inline functions using llvm.localescape.
; RUN: opt < %s -S -inline -inline-threshold=2 | FileCheck %s
; RUN: opt < %s -S -strip-debug -inline -inline-threshold=2 | FileCheck %s
+; RUN: opt < %s -S -passes='cgscc(inline)' -inline-threshold=2 | FileCheck %s
+; RUN: opt < %s -S -strip-debug -passes='cgscc(inline)' -inline-threshold=2 | FileCheck %s
;
; The purpose of this test is to check that debug info doesn't influence
; inlining decisions.
; RUN: opt -inline -S -o - < %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
%0 = type opaque
%struct.Foo = type { i32, %0* }
; RUN: opt -S -inline -inline-threshold=275 < %s | FileCheck %s
+; RUN: opt -S -passes='cgscc(inline)' -inline-threshold=275 < %s | FileCheck %s
; PR13095
; The performance of the c-ray benchmark largely depends on the inlining of a
-; RUN: opt < %s -inline -inlinecold-threshold=0 -S | FileCheck %s
+; RUN: opt < %s -inline -inlinecold-threshold=0 -S | FileCheck %s
+; RUN: opt < %s -passes='require<profile-summary>,cgscc(inline)' -inlinecold-threshold=0 -S | FileCheck %s
; This tests that a cold callee gets the (lower) inlinecold-threshold even without
; Cold hint and does not get inlined because the cost exceeds the inlinecold-threshold.
; RUN: opt -S -inline < %s | FileCheck %s
+; RUN: opt -S -passes='cgscc(inline)' < %s | FileCheck %s
target datalayout = "e-p3:32:32-p4:64:64-n32"
; RUN: opt < %s -S -inline -inline-threshold=20 | FileCheck %s
+; RUN: opt < %s -S -passes='cgscc(inline)' -inline-threshold=20 | FileCheck %s
; Check that we don't drop FastMathFlag when estimating inlining profitability.
;
; In this test we should inline 'foo' to 'boo', because it'll fold to a
; RUN: opt -S -inline < %s | FileCheck %s
+; RUN: opt -S -passes='cgscc(inline)' < %s | FileCheck %s
; Make sure that soft float implementations are calculated as being more expensive
; to the inliner.
; RUN: opt -inline -S %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S %s | FileCheck %s
declare void @g()
; RUN: opt < %s -inline -inline-threshold=0 -inlinehint-threshold=100 -S | FileCheck %s
+; RUN: opt < %s -passes='require<profile-summary>,cgscc(inline)' -inline-threshold=0 -inlinehint-threshold=100 -S | FileCheck %s
; This tests that a hot callee gets the (higher) inlinehint-threshold even without
; inline hints and gets inlined because the cost is less than inlinehint-threshold.
; RUN: opt < %s -inline -inline-threshold=0 -hot-callsite-threshold=100 -S | FileCheck %s
+; RUN: opt < %s -passes='require<profile-summary>,cgscc(inline)' -inline-threshold=0 -hot-callsite-threshold=100 -S | FileCheck %s
; This tests that a hot callsite gets the (higher) inlinehint-threshold even without
; without inline hints and gets inlined because the cost is less than
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
target triple = "x86_64-apple-darwin"
; In inliner, we assume that inline asm does not throw. This testing case makes
; RUN: opt < %s -inline -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline,function(instcombine))' -S | FileCheck %s
; We can't inline this thunk yet, but one day we will be able to. And when we
; do, this test case will be ready.
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
; We have to apply the less restrictive TailCallKind of the call site being
; inlined and any call sites cloned into the caller.
; RUN: opt -S -inline %s -o - | FileCheck %s
+; RUN: opt -S -passes='cgscc(inline)' %s -o - | FileCheck %s
; Check that memcpy2 is completely inlined away.
; CHECK-NOT: memcpy2
; uncond branches away after it is done specializing.
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
@A = weak global i32 0 ; <i32*> [#uses=1]
@B = weak global i32 0 ; <i32*> [#uses=1]
; RUN: opt < %s -inline -inline-threshold=20 -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -inline-threshold=20 -S | FileCheck %s
define internal i32 @callee1(i32 %A, i32 %B) {
%C = sdiv i32 %A, %B
; RUN: opt < %s -S -inline | FileCheck %s
+; RUN: opt < %s -S -passes='cgscc(inline)' | FileCheck %s
;
; The purpose of this test is to check that inline pass preserves debug info
; for variable using the dbg.declare intrinsic.
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
define internal i32 @callee1(i32 %A, i32 %B) {
; CHECK-NOT: @callee1
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
; Check that functions with "returns_twice" calls are only inlined,
; if they are themselves marked as such.
; RUN: opt -inline %s -S | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' %s -S | FileCheck %s
; Ensure SSP attributes are propagated correctly when inlining.
@.str = private unnamed_addr constant [11 x i8] c"fun_nossp\0A\00", align 1
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
; CHECK-LABEL: caller
; CHECK: call void @callee
ret void
}
-declare void @extern()
\ No newline at end of file
+declare void @extern()
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
@a = global i32 4
@_ZTIi = external global i8*
; RUN: opt %s -inline -S | FileCheck %s
+; RUN: opt %s -passes='cgscc(inline)' -S | FileCheck %s
declare void @external_func()
-; RUN: opt %s -inline -S | FileCheck %s
+; RUN: opt %s -passes='cgscc(inline)' -S | FileCheck %s
declare void @external_func()
declare void @abort()
; RUN: opt -inline < %s -S -o - -inline-threshold=100 | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' < %s -S -o - -inline-threshold=100 | FileCheck %s
target datalayout = "p:32:32"
; instructions
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
declare void @might_throw()
; turned into branches to the invoke destination.
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
declare void @might_throw()
; RUN: opt -inline -S < %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
declare void @use(i8* %a)
; RUN: opt -inline -S < %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
declare void @llvm.lifetime.start(i64, i8*)
; RUN: opt -inline -S < %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
; Make sure the inliner doesn't crash when a metadata-bridged SSA operand is an
; undominated use.
; RUN: opt -S -inline %s | FileCheck %s
+; RUN: opt -S -passes='cgscc(inline)' %s | FileCheck %s
declare void @foo()
declare void @bar()
; RUN: opt -S -inline < %s | FileCheck %s
+; RUN: opt -S -passes='cgscc(inline)' < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
$c = comdat any
; CHECK: $c = comdat any
; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline),globaldce' -S | FileCheck %s
$f1 = comdat any
; CHECK-NOT: $f1 = comdat any
; RUN: opt -S -inline < %s | FileCheck %s
+; RUN: opt -S -passes='cgscc(inline)' < %s | FileCheck %s
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-pc-windows-msvc18.0.0"
-; RUN: opt -S -inline < %s | FileCheck %s
+; RUN: opt -S -passes='cgscc(inline)' < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; RUN: opt < %s -S -inline | FileCheck %s
+; RUN: opt < %s -S -passes='cgscc(inline)' | FileCheck %s
; Make sure that profile and unpredictable metadata is preserved when cloning a select.
; RUN: opt -inline -S < %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin10.0"
; RUN: opt < %s -inline -inline-threshold=20 -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -inline-threshold=20 -S | FileCheck %s
define i32 @callee(i32 %a) {
switch i32 %a, label %sw.default [
; RUN: opt < %s -inline -inline-threshold=35 -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -inline-threshold=35 -S | FileCheck %s
define i32 @bar(<4 x i32> %v, i32 %i) #0 {
entry:
; RUN: opt -inline -S %s | FileCheck %s
+; RUN: opt -passes='cgscc(inline)' -S %s | FileCheck %s
define void @f() {
entry: