summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvandro Menezes <e.menezes@samsung.com>2016-08-01 18:39:45 +0000
committerEvandro Menezes <e.menezes@samsung.com>2016-08-01 18:39:45 +0000
commit82e245a202138f5ec9bd673126d35a9d6bd51410 (patch)
tree01afe23a896d6d6fa6836b7e9031c624ae5b75ad
parent1bd5e3ec56b2976a54468242b0b0757b609f4e26 (diff)
downloadbcm5719-llvm-82e245a202138f5ec9bd673126d35a9d6bd51410.tar.gz
bcm5719-llvm-82e245a202138f5ec9bd673126d35a9d6bd51410.zip
[AArch64] Add support for Samsung Exynos M2 (NFC).
llvm-svn: 277364
-rw-r--r--llvm/include/llvm/Support/AArch64TargetParser.def2
-rw-r--r--llvm/include/llvm/Support/ARMTargetParser.def1
-rw-r--r--llvm/lib/Target/AArch64/AArch64.td1
-rw-r--r--llvm/lib/Target/ARM/ARM.td6
-rw-r--r--llvm/test/CodeGen/AArch64/cpus.ll1
-rw-r--r--llvm/test/CodeGen/AArch64/remat.ll1
-rw-r--r--llvm/test/CodeGen/ARM/build-attributes.ll30
-rw-r--r--llvm/unittests/Support/TargetParserTest.cpp7
8 files changed, 45 insertions, 4 deletions
diff --git a/llvm/include/llvm/Support/AArch64TargetParser.def b/llvm/include/llvm/Support/AArch64TargetParser.def
index 9f7e9d04021..d15a00fd34b 100644
--- a/llvm/include/llvm/Support/AArch64TargetParser.def
+++ b/llvm/include/llvm/Support/AArch64TargetParser.def
@@ -65,6 +65,8 @@ AARCH64_CPU_NAME("cyclone", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
(AArch64::AEK_SIMD | AArch64::AEK_CRYPTO))
AARCH64_CPU_NAME("exynos-m1", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
(AArch64::AEK_SIMD | AArch64::AEK_CRC | AArch64::AEK_CRYPTO))
+AARCH64_CPU_NAME("exynos-m2", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
+ (AArch64::AEK_SIMD | AArch64::AEK_CRC | AArch64::AEK_CRYPTO))
AARCH64_CPU_NAME("kryo", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
(AArch64::AEK_SIMD | AArch64::AEK_CRC | AArch64::AEK_CRYPTO))
AARCH64_CPU_NAME("vulcan", AK_ARMV8_1A, FK_CRYPTO_NEON_FP_ARMV8, false,
diff --git a/llvm/include/llvm/Support/ARMTargetParser.def b/llvm/include/llvm/Support/ARMTargetParser.def
index 195f7112d6a..037d2499d99 100644
--- a/llvm/include/llvm/Support/ARMTargetParser.def
+++ b/llvm/include/llvm/Support/ARMTargetParser.def
@@ -232,6 +232,7 @@ ARM_CPU_NAME("cortex-a72", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_C
ARM_CPU_NAME("cortex-a73", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
ARM_CPU_NAME("cyclone", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
ARM_CPU_NAME("exynos-m1", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
+ARM_CPU_NAME("exynos-m2", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
// Non-standard Arch names.
ARM_CPU_NAME("iwmmxt", AK_IWMMXT, FK_NONE, true, ARM::AEK_NONE)
ARM_CPU_NAME("xscale", AK_XSCALE, FK_NONE, true, ARM::AEK_NONE)
diff --git a/llvm/lib/Target/AArch64/AArch64.td b/llvm/lib/Target/AArch64/AArch64.td
index b97a0f155dc..13a32d87d71 100644
--- a/llvm/lib/Target/AArch64/AArch64.td
+++ b/llvm/lib/Target/AArch64/AArch64.td
@@ -270,6 +270,7 @@ def : ProcessorModel<"cortex-a72", CortexA57Model, [ProcA72]>;
def : ProcessorModel<"cortex-a73", CortexA57Model, [ProcA73]>;
def : ProcessorModel<"cyclone", CycloneModel, [ProcCyclone]>;
def : ProcessorModel<"exynos-m1", ExynosM1Model, [ProcExynosM1]>;
+def : ProcessorModel<"exynos-m2", ExynosM1Model, [ProcExynosM1]>;
def : ProcessorModel<"kryo", KryoModel, [ProcKryo]>;
def : ProcessorModel<"vulcan", VulcanModel, [ProcVulcan]>;
diff --git a/llvm/lib/Target/ARM/ARM.td b/llvm/lib/Target/ARM/ARM.td
index eb4082d3a18..1aa975bd54a 100644
--- a/llvm/lib/Target/ARM/ARM.td
+++ b/llvm/lib/Target/ARM/ARM.td
@@ -798,6 +798,12 @@ def : ProcNoItin<"exynos-m1", [ARMv8a, ProcExynosM1,
FeatureCrypto,
FeatureCRC]>;
+def : ProcNoItin<"exynos-m2", [ARMv8a, ProcExynosM1,
+ FeatureHWDiv,
+ FeatureHWDivARM,
+ FeatureCrypto,
+ FeatureCRC]>;
+
//===----------------------------------------------------------------------===//
// Register File Description
//===----------------------------------------------------------------------===//
diff --git a/llvm/test/CodeGen/AArch64/cpus.ll b/llvm/test/CodeGen/AArch64/cpus.ll
index 3296e38b64f..a2cbedfc54c 100644
--- a/llvm/test/CodeGen/AArch64/cpus.ll
+++ b/llvm/test/CodeGen/AArch64/cpus.ll
@@ -8,6 +8,7 @@
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a72 2>&1 | FileCheck %s
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a73 2>&1 | FileCheck %s
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m1 2>&1 | FileCheck %s
+; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m2 2>&1 | FileCheck %s
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=kryo 2>&1 | FileCheck %s
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=vulcan 2>&1 | FileCheck %s
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=invalidcpu 2>&1 | FileCheck %s --check-prefix=INVALID
diff --git a/llvm/test/CodeGen/AArch64/remat.ll b/llvm/test/CodeGen/AArch64/remat.ll
index b2ca1cca081..f07619aab27 100644
--- a/llvm/test/CodeGen/AArch64/remat.ll
+++ b/llvm/test/CodeGen/AArch64/remat.ll
@@ -4,6 +4,7 @@
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a72 -o - %s | FileCheck %s
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a73 -o - %s | FileCheck %s
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m1 -o - %s | FileCheck %s
+; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m2 -o - %s | FileCheck %s
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=kryo -o - %s | FileCheck %s
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=vulcan -o - %s | FileCheck %s
; RUN: llc -mtriple=aarch64-linux-gnuabi -mattr=+custom-cheap-as-move -o - %s | FileCheck %s
diff --git a/llvm/test/CodeGen/ARM/build-attributes.ll b/llvm/test/CodeGen/ARM/build-attributes.ll
index b3b39a0d550..990db8a00c4 100644
--- a/llvm/test/CodeGen/ARM/build-attributes.ll
+++ b/llvm/test/CodeGen/ARM/build-attributes.ll
@@ -128,6 +128,9 @@
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m1 | FileCheck %s --check-prefix=EXYNOS-M1
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m1 -enable-unsafe-fp-math -disable-fp-elim -enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast | FileCheck %s --check-prefix=EXYNOS-M1-FAST
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m1 -enable-sign-dependent-rounding-fp-math | FileCheck %s --check-prefix=DYN-ROUNDING
+; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m2 | FileCheck %s --check-prefix=EXYNOS-M2
+; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m2 -enable-unsafe-fp-math -disable-fp-elim -enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast | FileCheck %s --check-prefix=EXYNOS-M1-FAST
+; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m2 -enable-sign-dependent-rounding-fp-math | FileCheck %s --check-prefix=DYN-ROUNDING
; RUN: llc < %s -mtriple=armv8.1a-linux-gnueabi -enable-unsafe-fp-math -disable-fp-elim -enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast | FileCheck %s --check-prefix=GENERIC-ARMV8_1-A-FAST
; RUN: llc < %s -mtriple=armv8.1a-linux-gnueabi -enable-sign-dependent-rounding-fp-math | FileCheck %s --check-prefix=DYN-ROUNDING
; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mcpu=cortex-a7 | FileCheck %s --check-prefix=CORTEX-A7-CHECK
@@ -160,6 +163,8 @@
; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=cortex-a72 -mattr=+strict-align | FileCheck %s --check-prefix=STRICT-ALIGN
; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m1 | FileCheck %s --check-prefix=NO-STRICT-ALIGN
; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m1 -mattr=+strict-align | FileCheck %s --check-prefix=STRICT-ALIGN
+; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m2 | FileCheck %s --check-prefix=NO-STRICT-ALIGN
+; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m2 -mattr=+strict-align | FileCheck %s --check-prefix=STRICT-ALIGN
; ARMv7a
; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mcpu=cortex-a7 | FileCheck %s --check-prefix=NO-STRICT-ALIGN
@@ -1446,7 +1451,7 @@
; EXYNOS-M1: .eabi_attribute 38, 1
; EXYNOS-M1: .eabi_attribute 42, 1
; EXYNOS-M1-NOT: .eabi_attribute 44
-; EXYNOS-M15: .eabi_attribute 68, 3
+; EXYNOS-M1: .eabi_attribute 68, 3
; EXYNOS-M1-FAST-NOT: .eabi_attribute 19
;; The exynos-m1 has the ARMv8 FP unit, which always flushes preserving sign.
@@ -1455,6 +1460,29 @@
; EXYNOS-M1-FAST-NOT: .eabi_attribute 22
; EXYNOS-M1-FAST: .eabi_attribute 23, 1
+; EXYNOS-M2: .cpu exynos-m2
+; EXYNOS-M2: .eabi_attribute 6, 14
+; EXYNOS-M2: .eabi_attribute 7, 65
+; EXYNOS-M2: .eabi_attribute 8, 1
+; EXYNOS-M2: .eabi_attribute 9, 2
+; EXYNOS-M2: .fpu crypto-neon-fp-armv8
+; EXYNOS-M2: .eabi_attribute 12, 3
+; EXYNOS-M2-NOT: .eabi_attribute 19
+;; We default to IEEE 754 compliance
+; EXYNOS-M2: .eabi_attribute 20, 1
+; EXYNOS-M2: .eabi_attribute 21, 1
+; EXYNOS-M2-NOT: .eabi_attribute 22
+; EXYNOS-M2: .eabi_attribute 23, 3
+; EXYNOS-M2: .eabi_attribute 24, 1
+; EXYNOS-M2: .eabi_attribute 25, 1
+; EXYNOS-M2-NOT: .eabi_attribute 27
+; EXYNOS-M2-NOT: .eabi_attribute 28
+; EXYNOS-M2: .eabi_attribute 36, 1
+; EXYNOS-M2: .eabi_attribute 38, 1
+; EXYNOS-M2: .eabi_attribute 42, 1
+; EXYNOS-M2-NOT: .eabi_attribute 44
+; EXYNOS-M2: .eabi_attribute 68, 3
+
; GENERIC-FPU-VFPV3-FP16: .fpu vfpv3-fp16
; GENERIC-FPU-VFPV3-D16-FP16: .fpu vfpv3-d16-fp16
; GENERIC-FPU-VFPV3XD: .fpu vfpv3xd
diff --git a/llvm/unittests/Support/TargetParserTest.cpp b/llvm/unittests/Support/TargetParserTest.cpp
index 9c8d6374500..ae96571a3dd 100644
--- a/llvm/unittests/Support/TargetParserTest.cpp
+++ b/llvm/unittests/Support/TargetParserTest.cpp
@@ -310,8 +310,8 @@ TEST(TargetParserTest, ARMparseCPUArch) {
"cortex-r5", "cortex-r7", "cortex-r8", "sc300",
"cortex-m3", "cortex-m4", "cortex-m7", "cortex-a32",
"cortex-a35", "cortex-a53", "cortex-a57", "cortex-a72",
- "cortex-a73", "cyclone", "exynos-m1", "iwmmxt",
- "xscale", "swift"};
+ "cortex-a73", "cyclone", "exynos-m1", "exynos-m2",
+ "iwmmxt", "xscale", "swift"};
for (const auto &ARMCPUName : kARMCPUNames)
EXPECT_TRUE(contains(CPU, ARMCPUName.Name)
@@ -535,7 +535,8 @@ TEST(TargetParserTest, AArch64parseArchExt) {
TEST(TargetParserTest, AArch64parseCPUArch) {
const char *CPU[] = {"cortex-a35", "cortex-a53", "cortex-a57",
"cortex-a72", "cortex-a73", "cyclone",
- "exynos-m1", "kryo", "vulcan"};
+ "exynos-m1", "exynos-m2", "kryo",
+ "vulcan"};
for (const auto &AArch64CPUName : kAArch64CPUNames)
EXPECT_TRUE(contains(CPU, AArch64CPUName.Name)
OpenPOWER on IntegriCloud