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 6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 7 target triple = "x86_64-unknown-linux-gnu" 8 9 define i32 @foo() #0 { 10 entry: 11 %call = call i32 (...) @baz() 12 ret i32 %call 13 ; CHECK-LABEL: foo 14 ; CHECK: call i32 (...) @baz() 15 } 16 declare i32 @baz(...) #0 17 18 define i32 @bar() #1 { 19 entry: 20 %call = call i32 @foo() 21 ret i32 %call 22 ; CHECK-LABEL: bar 23 ; CHECK: call i32 (...) @baz() 24 } 25 26 define i32 @qux() #0 { 27 entry: 28 %call = call i32 @bar() 29 ret i32 %call 30 ; CHECK-LABEL: qux 31 ; CHECK: call i32 @bar() 32 } 33 34 attributes #0 = { "target-cpu"="x86-64" "target-features"="+sse,+sse2" } 35 attributes #1 = { "target-cpu"="x86-64" "target-features"="+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3" } 36