1 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -S -passes=inline | FileCheck %s
2 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -S -passes='cgscc(inline)' | FileCheck %s
3 ; Check that we only inline when we have compatible target attributes.
4 ; X86 has implemented a target attribute that will verify that the attribute
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target triple = "x86_64-unknown-linux-gnu"
10 define i32 @foo() #0 {
12 %call = call i32 (...) @baz()
15 ; CHECK: call i32 (...) @baz()
17 declare i32 @baz(...) #0
19 define i32 @bar() #1 {
21 %call = call i32 @foo()
24 ; CHECK: call i32 (...) @baz()
27 define i32 @qux() #0 {
29 %call = call i32 @bar()
32 ; CHECK: call i32 @bar()
35 attributes #0 = { "target-cpu"="x86-64" "target-features"="+sse,+sse2" }
36 attributes #1 = { "target-cpu"="x86-64" "target-features"="+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3" }