forked from OSchip/llvm-project
[AArch64] Add support for Cortex-A76 and Cortex-A76AE
- Add LLVM backend support for Cortex-A76 and Cortex-A76AE - Documentation can be found at https://developer.arm.com/products/processors/cortex-a/cortex-a76 llvm-svn: 354788
This commit is contained in:
parent
51c1f640aa
commit
59f77e7891
|
@ -93,6 +93,12 @@ AARCH64_CPU_NAME("cortex-a73", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
|||
(AArch64::AEK_CRC))
|
||||
AARCH64_CPU_NAME("cortex-a75", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
(AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC))
|
||||
AARCH64_CPU_NAME("cortex-a76", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
(AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC |
|
||||
AArch64::AEK_SSBS))
|
||||
AARCH64_CPU_NAME("cortex-a76ae", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
(AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC |
|
||||
AArch64::AEK_SSBS))
|
||||
AARCH64_CPU_NAME("cyclone", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
(AArch64::AEK_NONE))
|
||||
AARCH64_CPU_NAME("exynos-m1", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
|
|
|
@ -261,6 +261,10 @@ ARM_CPU_NAME("cortex-a72", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
|
|||
ARM_CPU_NAME("cortex-a73", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
|
||||
ARM_CPU_NAME("cortex-a75", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
(ARM::AEK_FP16 | ARM::AEK_DOTPROD))
|
||||
ARM_CPU_NAME("cortex-a76", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
(ARM::AEK_FP16 | ARM::AEK_DOTPROD))
|
||||
ARM_CPU_NAME("cortex-a76ae", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
(ARM::AEK_FP16 | ARM::AEK_DOTPROD))
|
||||
ARM_CPU_NAME("cyclone", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
|
||||
ARM_CPU_NAME("exynos-m1", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
|
||||
ARM_CPU_NAME("exynos-m2", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
|
||||
|
|
|
@ -482,6 +482,18 @@ def ProcA75 : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75",
|
|||
FeaturePerfMon
|
||||
]>;
|
||||
|
||||
def ProcA76 : SubtargetFeature<"a76", "ARMProcFamily", "CortexA76",
|
||||
"Cortex-A76 ARM processors", [
|
||||
HasV8_2aOps,
|
||||
FeatureFPARMv8,
|
||||
FeatureNEON,
|
||||
FeatureRCPC,
|
||||
FeatureCrypto,
|
||||
FeatureFullFP16,
|
||||
FeatureDotProd,
|
||||
FeatureSSBS
|
||||
]>;
|
||||
|
||||
// Note that cyclone does not fuse AES instructions, but newer apple chips do
|
||||
// perform the fusion and cyclone is used by default when targetting apple OSes.
|
||||
def ProcCyclone : SubtargetFeature<"cyclone", "ARMProcFamily", "Cyclone",
|
||||
|
@ -693,10 +705,11 @@ def : ProcessorModel<"cortex-a35", CortexA53Model, [ProcA35]>;
|
|||
def : ProcessorModel<"cortex-a53", CortexA53Model, [ProcA53]>;
|
||||
def : ProcessorModel<"cortex-a55", CortexA53Model, [ProcA55]>;
|
||||
def : ProcessorModel<"cortex-a57", CortexA57Model, [ProcA57]>;
|
||||
// FIXME: Cortex-A72, Cortex-A73 and Cortex-A75 are currently modeled as a Cortex-A57.
|
||||
def : ProcessorModel<"cortex-a72", CortexA57Model, [ProcA72]>;
|
||||
def : ProcessorModel<"cortex-a73", CortexA57Model, [ProcA73]>;
|
||||
def : ProcessorModel<"cortex-a75", CortexA57Model, [ProcA75]>;
|
||||
def : ProcessorModel<"cortex-a76", CortexA57Model, [ProcA76]>;
|
||||
def : ProcessorModel<"cortex-a76ae", CortexA57Model, [ProcA76]>;
|
||||
def : ProcessorModel<"cyclone", CycloneModel, [ProcCyclone]>;
|
||||
def : ProcessorModel<"exynos-m1", ExynosM1Model, [ProcExynosM1]>;
|
||||
def : ProcessorModel<"exynos-m2", ExynosM1Model, [ProcExynosM2]>;
|
||||
|
|
|
@ -82,6 +82,7 @@ void AArch64Subtarget::initializeProperties() {
|
|||
case CortexA72:
|
||||
case CortexA73:
|
||||
case CortexA75:
|
||||
case CortexA76:
|
||||
PrefFunctionAlignment = 4;
|
||||
break;
|
||||
case Cyclone:
|
||||
|
|
|
@ -45,6 +45,7 @@ public:
|
|||
CortexA72,
|
||||
CortexA73,
|
||||
CortexA75,
|
||||
CortexA76,
|
||||
Cyclone,
|
||||
ExynosM1,
|
||||
ExynosM3,
|
||||
|
|
|
@ -494,6 +494,8 @@ def ProcA73 : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73",
|
|||
"Cortex-A73 ARM processors", []>;
|
||||
def ProcA75 : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75",
|
||||
"Cortex-A75 ARM processors", []>;
|
||||
def ProcA76 : SubtargetFeature<"a76", "ARMProcFamily", "CortexA76",
|
||||
"Cortex-A76 ARM processors", []>;
|
||||
|
||||
def ProcKrait : SubtargetFeature<"krait", "ARMProcFamily", "Krait",
|
||||
"Qualcomm Krait processors", []>;
|
||||
|
@ -1059,6 +1061,22 @@ def : ProcNoItin<"cortex-a75", [ARMv82a, ProcA75,
|
|||
FeatureHWDivARM,
|
||||
FeatureDotProd]>;
|
||||
|
||||
def : ProcNoItin<"cortex-a76", [ARMv82a, ProcA76,
|
||||
FeatureHWDivThumb,
|
||||
FeatureHWDivARM,
|
||||
FeatureCrypto,
|
||||
FeatureCRC,
|
||||
FeatureFullFP16,
|
||||
FeatureDotProd]>;
|
||||
|
||||
def : ProcNoItin<"cortex-a76ae", [ARMv82a, ProcA76,
|
||||
FeatureHWDivThumb,
|
||||
FeatureHWDivARM,
|
||||
FeatureCrypto,
|
||||
FeatureCRC,
|
||||
FeatureFullFP16,
|
||||
FeatureDotProd]>;
|
||||
|
||||
def : ProcessorModel<"cyclone", SwiftModel, [ARMv8a, ProcSwift,
|
||||
FeatureHasRetAddrStack,
|
||||
FeatureNEONForFP,
|
||||
|
|
|
@ -284,6 +284,7 @@ void ARMSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
|||
case CortexA72:
|
||||
case CortexA73:
|
||||
case CortexA75:
|
||||
case CortexA76:
|
||||
case CortexR4:
|
||||
case CortexR4F:
|
||||
case CortexR5:
|
||||
|
|
|
@ -59,6 +59,7 @@ protected:
|
|||
CortexA72,
|
||||
CortexA73,
|
||||
CortexA75,
|
||||
CortexA76,
|
||||
CortexA8,
|
||||
CortexA9,
|
||||
CortexM3,
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
; 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=cortex-a75 2>&1 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a76ae 2>&1 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a76 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=exynos-m3 2>&1 | FileCheck %s
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// RUN: llvm-mc -triple aarch64 -mattr=+dotprod -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
|
||||
// RUN: llvm-mc -triple aarch64 -mcpu=cortex-a75 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
|
||||
// RUN: llvm-mc -triple aarch64 -mcpu=cortex-a76 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
|
||||
// RUN: llvm-mc -triple aarch64 -mcpu=cortex-a55 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
|
||||
// RUN: llvm-mc -triple aarch64 -mcpu=tsv110 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
|
||||
// RUN: not llvm-mc -triple aarch64 -mattr=+v8.2a -show-encoding < %s 2> %t
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// RUN: llvm-mc -triple aarch64 -show-encoding -mattr=+ssbs < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple aarch64 -show-encoding -mattr=+v8.5a < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple aarch64 -show-encoding -mcpu=cortex-a76 < %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple aarch64 -show-encoding -mcpu=cortex-a76ae < %s | FileCheck %s
|
||||
// RUN: not llvm-mc -triple aarch64 -show-encoding -mattr=-ssbs < %s 2>&1 | FileCheck %s --check-prefix=NOSPECID
|
||||
|
||||
mrs x2, SSBS
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// RUN: llvm-mc -triple arm -mattr=+dotprod -show-encoding < %s | FileCheck %s --check-prefix=CHECK
|
||||
// RUN: llvm-mc -triple arm -mcpu=cortex-a75 -show-encoding < %s | FileCheck %s --check-prefix=CHECK
|
||||
// RUN: llvm-mc -triple arm -mcpu=cortex-a76 -show-encoding < %s | FileCheck %s --check-prefix=CHECK
|
||||
// RUN: llvm-mc -triple arm -mcpu=cortex-a55 -show-encoding < %s | FileCheck %s --check-prefix=CHECK
|
||||
|
||||
// RUN: not llvm-mc -triple arm -mattr=-dotprod -show-encoding < %s 2> %t
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// RUN: llvm-mc -triple thumb -mattr=+dotprod -show-encoding < %s | FileCheck %s --check-prefix=CHECK
|
||||
// RUN: llvm-mc -triple thumb -mcpu=cortex-a75 -show-encoding < %s | FileCheck %s --check-prefix=CHECK
|
||||
// RUN: llvm-mc -triple thumb -mcpu=cortex-a76 -show-encoding < %s | FileCheck %s --check-prefix=CHECK
|
||||
// RUN: llvm-mc -triple thumb -mcpu=cortex-a55 -show-encoding < %s | FileCheck %s --check-prefix=CHECK
|
||||
|
||||
// RUN: not llvm-mc -triple thumb -mattr=-dotprod -show-encoding < %s 2> %t
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# RUN: llvm-mc -triple=aarch64 -mattr=+ssbs -disassemble < %s | FileCheck %s
|
||||
# RUN: llvm-mc -triple=aarch64 -mattr=+v8.5a -disassemble < %s | FileCheck %s
|
||||
# RUN: llvm-mc -triple=aarch64 -mcpu=cortex-a76 -disassemble < %s | FileCheck %s
|
||||
# RUN: llvm-mc -triple=aarch64 -mcpu=cortex-a76ae -disassemble < %s | FileCheck %s
|
||||
# RUN: llvm-mc -triple=aarch64 -mattr=-ssbs -disassemble < %s | FileCheck %s --check-prefix=NOSPECID
|
||||
|
||||
[0x3f 0x41 0x03 0xd5]
|
||||
|
|
|
@ -244,6 +244,18 @@ TEST(TargetParserTest, testARMCPU) {
|
|||
ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_FP16 |
|
||||
ARM::AEK_RAS | ARM::AEK_DOTPROD,
|
||||
"8.2-A"));
|
||||
EXPECT_TRUE(testARMCPU("cortex-a76", "armv8.2-a", "crypto-neon-fp-armv8",
|
||||
ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
|
||||
ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
|
||||
ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_FP16 |
|
||||
ARM::AEK_RAS | ARM::AEK_DOTPROD,
|
||||
"8.2-A"));
|
||||
EXPECT_TRUE(testARMCPU("cortex-a76ae", "armv8.2-a", "crypto-neon-fp-armv8",
|
||||
ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
|
||||
ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
|
||||
ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_FP16 |
|
||||
ARM::AEK_RAS | ARM::AEK_DOTPROD,
|
||||
"8.2-A"));
|
||||
EXPECT_TRUE(testARMCPU("cyclone", "armv8-a", "crypto-neon-fp-armv8",
|
||||
ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
|
||||
ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
|
||||
|
@ -283,7 +295,7 @@ TEST(TargetParserTest, testARMCPU) {
|
|||
"7-S"));
|
||||
}
|
||||
|
||||
static constexpr unsigned NumARMCPUArchs = 82;
|
||||
static constexpr unsigned NumARMCPUArchs = 84;
|
||||
|
||||
TEST(TargetParserTest, testARMCPUArchList) {
|
||||
SmallVector<StringRef, NumARMCPUArchs> List;
|
||||
|
@ -743,6 +755,18 @@ TEST(TargetParserTest, testAArch64CPU) {
|
|||
AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
|
||||
AArch64::AEK_RDM | AArch64::AEK_FP16 | AArch64::AEK_DOTPROD |
|
||||
AArch64::AEK_RCPC, "8.2-A"));
|
||||
EXPECT_TRUE(testAArch64CPU(
|
||||
"cortex-a76", "armv8.2-a", "crypto-neon-fp-armv8",
|
||||
AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
|
||||
AArch64::AEK_RDM | AArch64::AEK_SIMD | AArch64::AEK_RAS |
|
||||
AArch64::AEK_LSE | AArch64::AEK_FP16 | AArch64::AEK_DOTPROD |
|
||||
AArch64::AEK_RCPC| AArch64::AEK_SSBS, "8.2-A"));
|
||||
EXPECT_TRUE(testAArch64CPU(
|
||||
"cortex-a76ae", "armv8.2-a", "crypto-neon-fp-armv8",
|
||||
AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
|
||||
AArch64::AEK_RDM | AArch64::AEK_SIMD | AArch64::AEK_RAS |
|
||||
AArch64::AEK_LSE | AArch64::AEK_FP16 | AArch64::AEK_DOTPROD |
|
||||
AArch64::AEK_RCPC| AArch64::AEK_SSBS, "8.2-A"));
|
||||
EXPECT_TRUE(testAArch64CPU(
|
||||
"cyclone", "armv8-a", "crypto-neon-fp-armv8",
|
||||
AArch64::AEK_CRYPTO | AArch64::AEK_FP | AArch64::AEK_SIMD, "8-A"));
|
||||
|
@ -805,7 +829,7 @@ TEST(TargetParserTest, testAArch64CPU) {
|
|||
"8.2-A"));
|
||||
}
|
||||
|
||||
static constexpr unsigned NumAArch64CPUArchs = 21;
|
||||
static constexpr unsigned NumAArch64CPUArchs = 23;
|
||||
|
||||
TEST(TargetParserTest, testAArch64CPUArchList) {
|
||||
SmallVector<StringRef, NumAArch64CPUArchs> List;
|
||||
|
|
Loading…
Reference in New Issue