summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Parker <sam.parker@arm.com>2017-08-22 12:46:33 +0000
committerSam Parker <sam.parker@arm.com>2017-08-22 12:46:33 +0000
commitd65e19f7b38571e7d9723c337bd32b56164ae0f7 (patch)
tree7aadab523f923d4d1d817db8e53a6bc78fc6c99f
parent5bd647dfd0f5da4f8a0ee107ea3f1e2f6608e7c1 (diff)
downloadbcm5719-llvm-d65e19f7b38571e7d9723c337bd32b56164ae0f7.tar.gz
bcm5719-llvm-d65e19f7b38571e7d9723c337bd32b56164ae0f7.zip
[ARM][AArch64] Add Armv8.3-a unittests
Add Armv8.3-A to the architecture to the TargetParser unittests. Differential Revision: https://reviews.llvm.org/D36748 llvm-svn: 311450
-rw-r--r--llvm/unittests/Support/TargetParserTest.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/unittests/Support/TargetParserTest.cpp b/llvm/unittests/Support/TargetParserTest.cpp
index 2a9b576914d..0b5cc1c8eb5 100644
--- a/llvm/unittests/Support/TargetParserTest.cpp
+++ b/llvm/unittests/Support/TargetParserTest.cpp
@@ -25,9 +25,9 @@ const char *ARMArch[] = {
"armv7a", "armv7ve", "armv7hl", "armv7l", "armv7-r",
"armv7r", "armv7-m", "armv7m", "armv7k", "armv7s",
"armv7e-m", "armv7em", "armv8-a", "armv8", "armv8a",
- "armv8.1-a", "armv8.1a", "armv8.2-a", "armv8.2a", "armv8-r",
- "armv8r", "armv8-m.base", "armv8m.base", "armv8-m.main", "armv8m.main",
- "iwmmxt", "iwmmxt2", "xscale"};
+ "armv8.1-a", "armv8.1a", "armv8.2-a", "armv8.2a", "armv8.3-a",
+ "armv8.3a", "armv8-r", "armv8r", "armv8-m.base", "armv8m.base",
+ "armv8-m.main", "armv8m.main", "iwmmxt", "iwmmxt2", "xscale"};
bool testARMCPU(StringRef CPUName, StringRef ExpectedArch,
StringRef ExpectedFPU, unsigned ExpectedFlags,
@@ -355,6 +355,9 @@ TEST(TargetParserTest, testARMArch) {
testARMArch("armv8.2-a", "generic", "v8.2a",
ARMBuildAttrs::CPUArch::v8_A));
EXPECT_TRUE(
+ testARMArch("armv8.3-a", "generic", "v8.3a",
+ ARMBuildAttrs::CPUArch::v8_A));
+ EXPECT_TRUE(
testARMArch("armv8-r", "cortex-r52", "v8r",
ARMBuildAttrs::CPUArch::v8_R));
EXPECT_TRUE(
@@ -554,7 +557,7 @@ TEST(TargetParserTest, ARMparseArchEndianAndISA) {
"v6kz", "v6z", "v6zk", "v6-m", "v6m", "v6sm", "v6s-m", "v7-a",
"v7", "v7a", "v7ve", "v7hl", "v7l", "v7-r", "v7r", "v7-m",
"v7m", "v7k", "v7s", "v7e-m", "v7em", "v8-a", "v8", "v8a",
- "v8.1-a", "v8.1a", "v8.2-a", "v8.2a", "v8-r"};
+ "v8.1-a", "v8.1a", "v8.2-a", "v8.2a", "v8.3-a", "v8.3a", "v8-r"};
for (unsigned i = 0; i < array_lengthof(Arch); i++) {
std::string arm_1 = "armeb" + (std::string)(Arch[i]);
@@ -611,6 +614,7 @@ TEST(TargetParserTest, ARMparseArchProfile) {
case ARM::ArchKind::ARMV8A:
case ARM::ArchKind::ARMV8_1A:
case ARM::ArchKind::ARMV8_2A:
+ case ARM::ArchKind::ARMV8_3A:
EXPECT_EQ(ARM::ProfileKind::A, ARM::parseArchProfile(ARMArch[i]));
break;
default:
@@ -752,6 +756,8 @@ TEST(TargetParserTest, testAArch64Arch) {
ARMBuildAttrs::CPUArch::v8_A));
EXPECT_TRUE(testAArch64Arch("armv8.2-a", "generic", "v8.2a",
ARMBuildAttrs::CPUArch::v8_A));
+ EXPECT_TRUE(testAArch64Arch("armv8.3-a", "generic", "v8.3a",
+ ARMBuildAttrs::CPUArch::v8_A));
}
bool testAArch64Extension(StringRef CPUName, AArch64::ArchKind AK,
OpenPOWER on IntegriCloud