1; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -S -inline | FileCheck %s
2; Check that we only inline when we have compatible target attributes.
3; X86 has implemented a target attribute that will verify that the attribute
4; sets are compatible.
5
6target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7target triple = "x86_64-unknown-linux-gnu"
8
9define i32 @foo() #0 {
10entry:
11  %call = call i32 (...) @baz()
12  ret i32 %call
13; CHECK-LABEL: foo
14; CHECK: call i32 (...) @baz()
15}
16declare i32 @baz(...) #0
17
18define i32 @bar() #1 {
19entry:
20  %call = call i32 @foo()
21  ret i32 %call
22; CHECK-LABEL: bar
23; CHECK: call i32 (...) @baz()
24}
25
26define i32 @qux() #0 {
27entry:
28  %call = call i32 @bar()
29  ret i32 %call
30; CHECK-LABEL: qux
31; CHECK: call i32 @bar()
32}
33
34attributes #0 = { "target-cpu"="x86-64" "target-features"="+sse,+sse2" }
35attributes #1 = { "target-cpu"="x86-64" "target-features"="+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3" }
36