[llvm] r260621 - ARMv7k: use Cortex-A7 by default even for tvOS
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 11 15:49:08 PST 2016
Author: tnorthover
Date: Thu Feb 11 17:49:08 2016
New Revision: 260621
URL: http://llvm.org/viewvc/llvm-project?rev=260621&view=rev
Log:
ARMv7k: use Cortex-A7 by default even for tvOS
Also actually test the default CPU from those triples.
Modified:
llvm/trunk/lib/Support/Triple.cpp
llvm/trunk/unittests/ADT/TripleTest.cpp
Modified: llvm/trunk/lib/Support/Triple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=260621&r1=260620&r2=260621&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Triple.cpp (original)
+++ llvm/trunk/lib/Support/Triple.cpp Thu Feb 11 17:49:08 2016
@@ -1412,6 +1412,7 @@ StringRef Triple::getARMCPUForArch(Strin
case llvm::Triple::MacOSX:
case llvm::Triple::IOS:
case llvm::Triple::WatchOS:
+ case llvm::Triple::TvOS:
if (MArch == "v7k")
return "cortex-a7";
break;
Modified: llvm/trunk/unittests/ADT/TripleTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/TripleTest.cpp?rev=260621&r1=260620&r2=260621&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/TripleTest.cpp (original)
+++ llvm/trunk/unittests/ADT/TripleTest.cpp Thu Feb 11 17:49:08 2016
@@ -983,6 +983,18 @@ TEST(TripleTest, getARMCPUForArch) {
EXPECT_EQ("swift", Triple.getARMCPUForArch());
}
{
+ llvm::Triple Triple("armv7k-apple-ios9");
+ EXPECT_EQ("cortex-a7", Triple.getARMCPUForArch());
+ }
+ {
+ llvm::Triple Triple("armv7k-apple-watchos3");
+ EXPECT_EQ("cortex-a7", Triple.getARMCPUForArch());
+ }
+ {
+ llvm::Triple Triple("armv7k-apple-tvos9");
+ EXPECT_EQ("cortex-a7", Triple.getARMCPUForArch());
+ }
+ {
llvm::Triple Triple("armv7em-apple-ios7");
EXPECT_EQ("cortex-m4", Triple.getARMCPUForArch());
}
More information about the llvm-commits
mailing list