llvm.org GIT mirror llvm / 0472b1c
[ARM][AArch64] Cortex-A75 and Cortex-A55 support This patch introduces support for Cortex-A75 and Cortex-A55, Arm's latest big.LITTLE A-class cores. They implement the ARMv8.2-A architecture, including the cryptography and RAS extensions, plus the optional dot product extension. They also implement the RCpc AArch64 extension from ARMv8.3-A. Cortex-A75: https://developer.arm.com/products/processors/cortex-a/cortex-a75 Cortex-A55: https://developer.arm.com/products/processors/cortex-a/cortex-a55 Differential Revision: https://reviews.llvm.org/D36667 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311316 91177308-0d34-0410-b5e6-96231b3b80d8 Sam Parker 2 years ago
20 changed file(s) with 159 addition(s) and 36 deletion(s). Raw diff Collapse all Expand all
3131 AARCH64_ARCH("armv8.3-a", ARMV8_3A, "8.3-A", "v8.3a",
3232 ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
3333 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
34 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE))
34 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
35 AArch64::AEK_RCPC))
3536 #undef AARCH64_ARCH
3637
3738 #ifndef AARCH64_ARCH_EXT_NAME
5051 AARCH64_ARCH_EXT_NAME("profile", AArch64::AEK_PROFILE, "+spe", "-spe")
5152 AARCH64_ARCH_EXT_NAME("ras", AArch64::AEK_RAS, "+ras", "-ras")
5253 AARCH64_ARCH_EXT_NAME("sve", AArch64::AEK_SVE, "+sve", "-sve")
54 AARCH64_ARCH_EXT_NAME("rcpc", AArch64::AEK_RCPC, "+rcpc", "-rcpc")
5355 #undef AARCH64_ARCH_EXT_NAME
5456
5557 #ifndef AARCH64_CPU_NAME
5961 (AArch64::AEK_CRC))
6062 AARCH64_CPU_NAME("cortex-a53", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, true,
6163 (AArch64::AEK_CRC))
64 AARCH64_CPU_NAME("cortex-a55", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
65 (AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC))
6266 AARCH64_CPU_NAME("cortex-a57", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
6367 (AArch64::AEK_CRC))
6468 AARCH64_CPU_NAME("cortex-a72", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
6569 (AArch64::AEK_CRC))
6670 AARCH64_CPU_NAME("cortex-a73", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
6771 (AArch64::AEK_CRC))
72 AARCH64_CPU_NAME("cortex-a75", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
73 (AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC))
6874 AARCH64_CPU_NAME("cyclone", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
6975 (AArch64::AEK_NONE))
7076 AARCH64_CPU_NAME("exynos-m1", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
129129 ARM_ARCH_EXT_NAME("none", ARM::AEK_NONE, nullptr, nullptr)
130130 ARM_ARCH_EXT_NAME("crc", ARM::AEK_CRC, "+crc", "-crc")
131131 ARM_ARCH_EXT_NAME("crypto", ARM::AEK_CRYPTO, "+crypto","-crypto")
132 ARM_ARCH_EXT_NAME("dotprod", ARM::AEK_DOTPROD, "+dotprod","-dotprod")
132133 ARM_ARCH_EXT_NAME("dsp", ARM::AEK_DSP, "+dsp", "-dsp")
133134 ARM_ARCH_EXT_NAME("fp", ARM::AEK_FP, nullptr, nullptr)
134135 ARM_ARCH_EXT_NAME("idiv", (ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB), nullptr, nullptr)
240241 ARM_CPU_NAME("cortex-a32", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
241242 ARM_CPU_NAME("cortex-a35", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
242243 ARM_CPU_NAME("cortex-a53", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
244 ARM_CPU_NAME("cortex-a55", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
245 (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
243246 ARM_CPU_NAME("cortex-a57", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
244247 ARM_CPU_NAME("cortex-a72", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
245248 ARM_CPU_NAME("cortex-a73", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
249 ARM_CPU_NAME("cortex-a75", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
250 (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
246251 ARM_CPU_NAME("cyclone", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
247252 ARM_CPU_NAME("exynos-m1", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
248253 ARM_CPU_NAME("exynos-m2", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
6969
7070 // Arch extension modifiers for CPUs.
7171 enum ArchExtKind : unsigned {
72 AEK_INVALID = 0x0,
73 AEK_NONE = 0x1,
74 AEK_CRC = 0x2,
75 AEK_CRYPTO = 0x4,
76 AEK_FP = 0x8,
77 AEK_HWDIVTHUMB = 0x10,
78 AEK_HWDIVARM = 0x20,
79 AEK_MP = 0x40,
80 AEK_SIMD = 0x80,
81 AEK_SEC = 0x100,
82 AEK_VIRT = 0x200,
83 AEK_DSP = 0x400,
84 AEK_FP16 = 0x800,
85 AEK_RAS = 0x1000,
86 AEK_SVE = 0x2000,
72 AEK_INVALID = 0,
73 AEK_NONE = 1,
74 AEK_CRC = 1 << 1,
75 AEK_CRYPTO = 1 << 2,
76 AEK_FP = 1 << 3,
77 AEK_HWDIVTHUMB = 1 << 4,
78 AEK_HWDIVARM = 1 << 5,
79 AEK_MP = 1 << 6,
80 AEK_SIMD = 1 << 7,
81 AEK_SEC = 1 << 8,
82 AEK_VIRT = 1 << 9,
83 AEK_DSP = 1 << 10,
84 AEK_FP16 = 1 << 11,
85 AEK_RAS = 1 << 12,
86 AEK_SVE = 1 << 13,
87 AEK_DOTPROD = 1 << 14,
8788 // Unsupported extensions.
8889 AEK_OS = 0x8000000,
8990 AEK_IWMMXT = 0x10000000,
155156
156157 // Arch extension modifiers for CPUs.
157158 enum ArchExtKind : unsigned {
158 AEK_INVALID = 0x0,
159 AEK_NONE = 0x1,
160 AEK_CRC = 0x2,
161 AEK_CRYPTO = 0x4,
162 AEK_FP = 0x8,
163 AEK_SIMD = 0x10,
164 AEK_FP16 = 0x20,
165 AEK_PROFILE = 0x40,
166 AEK_RAS = 0x80,
167 AEK_LSE = 0x100,
168 AEK_SVE = 0x200,
169 AEK_DOTPROD = 0x400
159 AEK_INVALID = 0,
160 AEK_NONE = 1,
161 AEK_CRC = 1 << 1,
162 AEK_CRYPTO = 1 << 2,
163 AEK_FP = 1 << 3,
164 AEK_SIMD = 1 << 4,
165 AEK_FP16 = 1 << 5,
166 AEK_PROFILE = 1 << 6,
167 AEK_RAS = 1 << 7,
168 AEK_LSE = 1 << 8,
169 AEK_SVE = 1 << 9,
170 AEK_DOTPROD = 1 << 10,
171 AEK_RCPC = 1 << 11
170172 };
171173
172174 StringRef getCanonicalArchName(StringRef Arch);
234234 else
235235 Features.push_back("-dsp");
236236
237 if (Extensions & ARM::AEK_RAS)
238 Features.push_back("+ras");
239 else
240 Features.push_back("-ras");
241
242 if (Extensions & ARM::AEK_DOTPROD)
243 Features.push_back("+dotprod");
244 else
245 Features.push_back("-dotprod");
246
237247 return getHWDivFeatures(Extensions, Features);
238248 }
239249
437447 Features.push_back("+crc");
438448 if (Extensions & AArch64::AEK_CRYPTO)
439449 Features.push_back("+crypto");
450 if (Extensions & AArch64::AEK_DOTPROD)
451 Features.push_back("+dotprod");
440452 if (Extensions & AArch64::AEK_FP16)
441453 Features.push_back("+fullfp16");
442454 if (Extensions & AArch64::AEK_PROFILE)
447459 Features.push_back("+lse");
448460 if (Extensions & AArch64::AEK_SVE)
449461 Features.push_back("+sve");
462 if (Extensions & AArch64::AEK_RCPC)
463 Features.push_back("+rcpc");
450464
451465 return true;
452466 }
209209 FeatureUseAA
210210 ]>;
211211
212 def ProcA55 : SubtargetFeature<"a55", "ARMProcFamily", "CortexA55",
213 "Cortex-A55 ARM processors", [
214 FeatureCrypto,
215 FeatureFPARMv8,
216 FeatureFuseAES,
217 FeatureNEON,
218 FeatureFullFP16,
219 FeatureDotProd,
220 FeatureRCPC,
221 FeaturePerfMon
222 ]>;
223
212224 def ProcA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57",
213225 "Cortex-A57 ARM processors", [
214226 FeatureBalanceFPOps,
241253 FeatureFPARMv8,
242254 FeatureFuseAES,
243255 FeatureNEON,
256 FeaturePerfMon
257 ]>;
258
259 def ProcA75 : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75",
260 "Cortex-A75 ARM processors", [
261 FeatureCrypto,
262 FeatureFPARMv8,
263 FeatureFuseAES,
264 FeatureNEON,
265 FeatureFullFP16,
266 FeatureDotProd,
267 FeatureRCPC,
244268 FeaturePerfMon
245269 ]>;
246270
381405 FeaturePostRAScheduler
382406 ]>;
383407
384 // FIXME: Cortex-A35 is currently modeled as a Cortex-A53.
408 // FIXME: Cortex-A35 and Cortex-A55 are currently modeled as a Cortex-A53.
385409 def : ProcessorModel<"cortex-a35", CortexA53Model, [ProcA35]>;
386410 def : ProcessorModel<"cortex-a53", CortexA53Model, [ProcA53]>;
411 def : ProcessorModel<"cortex-a55", CortexA53Model, [ProcA55]>;
387412 def : ProcessorModel<"cortex-a57", CortexA57Model, [ProcA57]>;
388 // FIXME: Cortex-A72 and Cortex-A73 are currently modeled as a Cortex-A57.
413 // FIXME: Cortex-A72, Cortex-A73 and Cortex-A75 are currently modeled as a Cortex-A57.
389414 def : ProcessorModel<"cortex-a72", CortexA57Model, [ProcA72]>;
390415 def : ProcessorModel<"cortex-a73", CortexA57Model, [ProcA73]>;
416 def : ProcessorModel<"cortex-a75", CortexA57Model, [ProcA75]>;
391417 def : ProcessorModel<"cyclone", CycloneModel, [ProcCyclone]>;
392418 def : ProcessorModel<"exynos-m1", ExynosM1Model, [ProcExynosM1]>;
393419 def : ProcessorModel<"exynos-m2", ExynosM1Model, [ProcExynosM2]>;
450450 }
451451
452452 let Predicates = [HasRCPC] in {
453 // v8.3 Release Consistent Processor Consistent support
453 // v8.3 Release Consistent Processor Consistent support, optional in v8.2.
454454 def LDAPRB : RCPCLoad<0b00, "ldaprb", GPR32>;
455455 def LDAPRH : RCPCLoad<0b01, "ldaprh", GPR32>;
456456 def LDAPRW : RCPCLoad<0b10, "ldapr", GPR32>;
129129 case CortexA53:
130130 PrefFunctionAlignment = 3;
131131 break;
132 case CortexA55: break;
132133 case CortexA72:
133 PrefFunctionAlignment = 4;
134 break;
135134 case CortexA73:
135 case CortexA75:
136136 PrefFunctionAlignment = 4;
137137 break;
138138 case Others: break;
4040 Others,
4141 CortexA35,
4242 CortexA53,
43 CortexA55,
4344 CortexA57,
4445 CortexA72,
4546 CortexA73,
47 CortexA75,
4648 Cyclone,
4749 ExynosM1,
4850 Falkor,
434434 "Cortex-A35 ARM processors", []>;
435435 def ProcA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53",
436436 "Cortex-A53 ARM processors", []>;
437 def ProcA55 : SubtargetFeature<"a55", "ARMProcFamily", "CortexA55",
438 "Cortex-A55 ARM processors", []>;
437439 def ProcA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57",
438440 "Cortex-A57 ARM processors", []>;
439441 def ProcA72 : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72",
440442 "Cortex-A72 ARM processors", []>;
441443 def ProcA73 : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73",
442444 "Cortex-A73 ARM processors", []>;
445 def ProcA75 : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75",
446 "Cortex-A75 ARM processors", []>;
443447
444448 def ProcKrait : SubtargetFeature<"krait", "ARMProcFamily", "Krait",
445449 "Qualcomm Krait processors", []>;
920924 FeatureCRC,
921925 FeatureFPAO]>;
922926
927 def : ProcNoItin<"cortex-a55", [ARMv82a, ProcA55,
928 FeatureHWDivThumb,
929 FeatureHWDivARM,
930 FeatureDotProd]>;
931
923932 def : ProcessorModel<"cortex-a57", CortexA57Model, [ARMv8a, ProcA57,
924933 FeatureHWDivThumb,
925934 FeatureHWDivARM,
940949 FeatureHWDivARM,
941950 FeatureCrypto,
942951 FeatureCRC]>;
952
953 def : ProcNoItin<"cortex-a75", [ARMv82a, ProcA75,
954 FeatureHWDivThumb,
955 FeatureHWDivARM,
956 FeatureDotProd]>;
943957
944958 def : ProcessorModel<"cyclone", SwiftModel, [ARMv8a, ProcSwift,
945959 FeatureHasRetAddrStack,
278278 case CortexA32:
279279 case CortexA35:
280280 case CortexA53:
281 case CortexA55:
281282 case CortexA57:
282283 case CortexA72:
283284 case CortexA73:
285 case CortexA75:
284286 case CortexR4:
285287 case CortexR4F:
286288 case CortexR5:
5252 CortexA35,
5353 CortexA5,
5454 CortexA53,
55 CortexA55,
5556 CortexA57,
5657 CortexA7,
5758 CortexA72,
5859 CortexA73,
60 CortexA75,
5961 CortexA8,
6062 CortexA9,
6163 CortexM3,
33 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=generic 2>&1 | FileCheck %s
44 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a35 2>&1 | FileCheck %s
55 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a53 2>&1 | FileCheck %s
6 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a55 2>&1 | FileCheck %s
67 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a57 2>&1 | FileCheck %s
78 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a72 2>&1 | FileCheck %s
89 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a73 2>&1 | FileCheck %s
10 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a75 2>&1 | FileCheck %s
911 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m1 2>&1 | FileCheck %s
1012 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m2 2>&1 | FileCheck %s
1113 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m3 2>&1 | FileCheck %s
0 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a35 -o - %s | FileCheck %s
1 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a53 -o - %s | FileCheck %s
2 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a55 -o - %s | FileCheck %s
13 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a57 -o - %s | FileCheck %s
2 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a53 -o - %s | FileCheck %s
34 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a72 -o - %s | FileCheck %s
45 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a73 -o - %s | FileCheck %s
6 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a75 -o - %s | FileCheck %s
57 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m1 -o - %s | FileCheck %s
68 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m2 -o - %s | FileCheck %s
79 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m3 -o - %s | FileCheck %s
0 // RUN: llvm-mc -triple aarch64 -mattr=+dotprod -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
1 // RUN: llvm-mc -triple aarch64 -mcpu=cortex-a75 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
2 // RUN: llvm-mc -triple aarch64 -mcpu=cortex-a55 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
13 // RUN: not llvm-mc -triple aarch64 -mattr=+v8.2a -show-encoding < %s 2> %t
24 // RUN: FileCheck --check-prefix=CHECK-NO-DOTPROD < %t %s
35
0 // RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.3a < %s 2>&1 | FileCheck %s
1 // RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mcpu=cortex-a75 < %s 2>&1 | FileCheck %s
2 // RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mcpu=cortex-a55 < %s 2>&1 | FileCheck %s
3 // RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.2a -mattr=+rcpc < %s 2>&1 | FileCheck %s
14 // RUN: not llvm-mc -triple aarch64-none-linux-gnu -mattr=+v8.2a < %s 2> %t
25 // RUN: FileCheck --check-prefix=CHECK-REQ %s < %t
36
0 // RUN: llvm-mc -triple arm -mattr=+dotprod -show-encoding < %s | FileCheck %s --check-prefix=CHECK
1 // RUN: llvm-mc -triple arm -mcpu=cortex-a75 -show-encoding < %s | FileCheck %s --check-prefix=CHECK
2 // RUN: llvm-mc -triple arm -mcpu=cortex-a55 -show-encoding < %s | FileCheck %s --check-prefix=CHECK
13
24 // RUN: not llvm-mc -triple arm -mattr=-dotprod -show-encoding < %s 2> %t
35 // RUN: FileCheck --check-prefix=CHECK-NO-DOTPROD < %t %s
0 // RUN: llvm-mc -triple thumb -mattr=+dotprod -show-encoding < %s | FileCheck %s --check-prefix=CHECK
1 // RUN: llvm-mc -triple thumb -mcpu=cortex-a75 -show-encoding < %s | FileCheck %s --check-prefix=CHECK
2 // RUN: llvm-mc -triple thumb -mcpu=cortex-a55 -show-encoding < %s | FileCheck %s --check-prefix=CHECK
13
24 // RUN: not llvm-mc -triple thumb -mattr=-dotprod -show-encoding < %s 2> %t
35 // RUN: FileCheck --check-prefix=CHECK-ERROR < %t %s
0 # RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+dotprod --disassemble < %s | FileCheck %s
1 # RUN: llvm-mc -triple aarch64-none-linux-gnu -mcpu=cortex-a75 --disassemble < %s | FileCheck %s
2 # RUN: llvm-mc -triple aarch64-none-linux-gnu -mcpu=cortex-a55 --disassemble < %s | FileCheck %s
13 # RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=-dotprod --disassemble < %s 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
24
35 0x20,0x94,0x82,0x2e
0 # RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+v8.3a --disassemble < %s | FileCheck %s
1 # RUN: llvm-mc -triple aarch64-none-linux-gnu -mcpu=cortex-a75 --disassemble < %s | FileCheck %s
2 # RUN: llvm-mc -triple aarch64-none-linux-gnu -mcpu=cortex-a55 --disassemble < %s | FileCheck %s
3 # RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+v8.2a -mattr=+rcpc --disassemble < %s | FileCheck %s
14
25 # CHECK: ldaprb w0, [x0]
36 # CHECK: ldaprh w0, [x0]
217217 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
218218 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
219219 "8-A"));
220 EXPECT_TRUE(testARMCPU("cortex-a55", "armv8.2-a", "crypto-neon-fp-armv8",
221 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
222 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
223 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_FP16 |
224 ARM::AEK_RAS | ARM::AEK_DOTPROD,
225 "8.2-A"));
220226 EXPECT_TRUE(testARMCPU("cortex-a57", "armv8-a", "crypto-neon-fp-armv8",
221227 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
222228 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
232238 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
233239 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
234240 "8-A"));
241 EXPECT_TRUE(testARMCPU("cortex-a75", "armv8.2-a", "crypto-neon-fp-armv8",
242 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
243 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
244 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_FP16 |
245 ARM::AEK_RAS | ARM::AEK_DOTPROD,
246 "8.2-A"));
235247 EXPECT_TRUE(testARMCPU("cyclone", "armv8-a", "crypto-neon-fp-armv8",
236248 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
237249 ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
514526 {"virt", "novirt", nullptr, nullptr},
515527 {"fp16", "nofp16", "+fullfp16", "-fullfp16"},
516528 {"ras", "noras", "+ras", "-ras"},
529 {"dotprod", "nodotprod", "+dotprod", "-dotprod"},
517530 {"os", "noos", nullptr, nullptr},
518531 {"iwmmxt", "noiwmmxt", nullptr, nullptr},
519532 {"iwmmxt2", "noiwmmxt2", nullptr, nullptr},
650663 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
651664 AArch64::AEK_SIMD, "8-A"));
652665 EXPECT_TRUE(testAArch64CPU(
666 "cortex-a55", "armv8.2-a", "crypto-neon-fp-armv8",
667 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
668 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
669 AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC,
670 "8.2-A"));
671 EXPECT_TRUE(testAArch64CPU(
653672 "cortex-a57", "armv8-a", "crypto-neon-fp-armv8",
654673 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
655674 AArch64::AEK_SIMD, "8-A"));
661680 "cortex-a73", "armv8-a", "crypto-neon-fp-armv8",
662681 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
663682 AArch64::AEK_SIMD, "8-A"));
683 EXPECT_TRUE(testAArch64CPU(
684 "cortex-a75", "armv8.2-a", "crypto-neon-fp-armv8",
685 AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
686 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
687 AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC,
688 "8.2-A"));
664689 EXPECT_TRUE(testAArch64CPU(
665690 "cyclone", "armv8-a", "crypto-neon-fp-armv8",
666691 AArch64::AEK_CRYPTO | AArch64::AEK_FP | AArch64::AEK_SIMD, "8-A"));
739764 AArch64::ArchKind::INVALID, "ras"));
740765 EXPECT_FALSE(testAArch64Extension("cortex-a53",
741766 AArch64::ArchKind::INVALID, "ras"));
767 EXPECT_TRUE(testAArch64Extension("cortex-a55",
768 AArch64::ArchKind::INVALID, "ras"));
742769 EXPECT_FALSE(testAArch64Extension("cortex-a57",
743770 AArch64::ArchKind::INVALID, "ras"));
744771 EXPECT_FALSE(testAArch64Extension("cortex-a72",
745772 AArch64::ArchKind::INVALID, "ras"));
746773 EXPECT_FALSE(testAArch64Extension("cortex-a73",
774 AArch64::ArchKind::INVALID, "ras"));
775 EXPECT_TRUE(testAArch64Extension("cortex-a75",
747776 AArch64::ArchKind::INVALID, "ras"));
748777 EXPECT_FALSE(testAArch64Extension("cyclone",
749778 AArch64::ArchKind::INVALID, "ras"));
775804 unsigned Extensions = AArch64::AEK_CRC | AArch64::AEK_CRYPTO |
776805 AArch64::AEK_FP | AArch64::AEK_SIMD |
777806 AArch64::AEK_FP16 | AArch64::AEK_PROFILE |
778 AArch64::AEK_RAS | AArch64::AEK_SVE;
807 AArch64::AEK_RAS | AArch64::AEK_SVE |
808 AArch64::AEK_DOTPROD | AArch64::AEK_RCPC;
779809
780810 for (unsigned i = 0; i <= Extensions; i++)
781811 EXPECT_TRUE(i == 0 ? !AArch64::getExtensionFeatures(i, Features)
804834 {"fp16", "nofp16", "+fullfp16", "-fullfp16"},
805835 {"profile", "noprofile", "+spe", "-spe"},
806836 {"ras", "noras", "+ras", "-ras"},
807 {"sve", "nosve", "+sve", "-sve"}};
837 {"sve", "nosve", "+sve", "-sve"},
838 {"dotprod", "nodotprod", "+dotprod", "-dotprod"},
839 {"rcpc", "norcpc", "+rcpc", "-rcpc" }};
808840
809841 for (unsigned i = 0; i < array_lengthof(ArchExt); i++) {
810842 EXPECT_EQ(StringRef(ArchExt[i][2]),