From: Eric Christopher Date: Thu, 2 Jul 2015 01:36:31 +0000 (+0000) Subject: Make an X86 specific directory and put the recent X86 tti specific X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bbc90cea144cc5a7a0959756d236a20ebb01b3c7;p=oota-llvm.git Make an X86 specific directory and put the recent X86 tti specific inlining test into it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241223 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/Inline/X86/inline-target-attr.ll b/test/Transforms/Inline/X86/inline-target-attr.ll new file mode 100644 index 00000000000..c59f4b4594b --- /dev/null +++ b/test/Transforms/Inline/X86/inline-target-attr.ll @@ -0,0 +1,35 @@ +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -S -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. + +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +define i32 @foo() #0 { +entry: + %call = call i32 (...) @baz() + ret i32 %call +; CHECK-LABEL: foo +; CHECK: call i32 (...) @baz() +} +declare i32 @baz(...) #0 + +define i32 @bar() #1 { +entry: + %call = call i32 @foo() + ret i32 %call +; CHECK-LABEL: bar +; CHECK: call i32 (...) @baz() +} + +define i32 @qux() #0 { +entry: + %call = call i32 @bar() + ret i32 %call +; CHECK-LABEL: qux +; CHECK: call i32 @bar() +} + +attributes #0 = { "target-cpu"="x86-64" "target-features"="+sse,+sse2" } +attributes #1 = { "target-cpu"="x86-64" "target-features"="+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3" } diff --git a/test/Transforms/Inline/X86/lit.local.cfg b/test/Transforms/Inline/X86/lit.local.cfg new file mode 100644 index 00000000000..e71f3cc4c41 --- /dev/null +++ b/test/Transforms/Inline/X86/lit.local.cfg @@ -0,0 +1,3 @@ +if not 'X86' in config.root.targets: + config.unsupported = True + diff --git a/test/Transforms/Inline/inline-target-attr.ll b/test/Transforms/Inline/inline-target-attr.ll deleted file mode 100644 index 90b393212e5..00000000000 --- a/test/Transforms/Inline/inline-target-attr.ll +++ /dev/null @@ -1,35 +0,0 @@ -; RUN: opt < %s -S -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. - -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -define i32 @foo() #0 { -entry: - %call = call i32 (...) @baz() - ret i32 %call -; CHECK-LABEL: foo -; CHECK: call i32 (...) @baz() -} -declare i32 @baz(...) #0 - -define i32 @bar() #1 { -entry: - %call = call i32 @foo() - ret i32 %call -; CHECK-LABEL: bar -; CHECK: call i32 (...) @baz() -} - -define i32 @qux() #0 { -entry: - %call = call i32 @bar() - ret i32 %call -; CHECK-LABEL: qux -; CHECK: call i32 @bar() -} - -attributes #0 = { "target-cpu"="x86-64" "target-features"="+sse,+sse2" } -attributes #1 = { "target-cpu"="x86-64" "target-features"="+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3" }