[llvm] [AArch64] Correct features for Arm Cortex-A78C, Cortex-X1C and Cortex-X2 (PR #76932)
Jonathan Thackray via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 4 02:18:06 PST 2024
https://github.com/jthackray created https://github.com/llvm/llvm-project/pull/76932
Remove AArch64::AEK_FP16ML from Arm Cortex-A78C definition, as
this is not supported, according to the Technical Reference Manual:
https://developer.arm.com/documentation/102226/latest/
Also add AArch64::AEK_FLAGM (Flag Manipulation) to Arm Cortex-X1C
and Arm Cortex-X2 as these were missing previously, but are
supported, according to the Technical Reference Manuals:
https://developer.arm.com/documentation/101968/latest/
https://developer.arm.com/documentation/101803/latest/
Fixes #62383
>From 5cecda3192e15dbf317fc0c7c7f6b94d5d0518ad Mon Sep 17 00:00:00 2001
From: Jonathan Thackray <jonathan.thackray at arm.com>
Date: Mon, 11 Dec 2023 19:01:16 +0000
Subject: [PATCH] [AArch64] Correct features for Arm Cortex-A78C, Cortex-X1C
and Cortex-X2
Remove AArch64::AEK_FP16ML from Arm Cortex-A78C definition, as
this is not supported, according to the Technical Reference Manual:
https://developer.arm.com/documentation/102226/latest/
Also add AArch64::AEK_FLAGM (Flag Manipulation) to Arm Cortex-X1C
and Arm Cortex-X2 as these were missing previously, but are
supported, according to the Technical Reference Manuals:
https://developer.arm.com/documentation/101968/latest/
https://developer.arm.com/documentation/101803/latest/
Fixes #62383
---
llvm/include/llvm/TargetParser/AArch64TargetParser.h | 7 +++----
llvm/lib/Target/AArch64/AArch64.td | 2 +-
llvm/unittests/TargetParser/TargetParserTest.cpp | 6 +++---
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/llvm/include/llvm/TargetParser/AArch64TargetParser.h b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
index 53dc2be825f28e..2fe4d5eeb742c9 100644
--- a/llvm/include/llvm/TargetParser/AArch64TargetParser.h
+++ b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
@@ -482,8 +482,7 @@ inline constexpr CpuInfo CpuInfos[] = {
(AArch64::ExtensionBitset(
{AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16,
AArch64::AEK_DOTPROD, AArch64::AEK_RCPC, AArch64::AEK_SSBS,
- AArch64::AEK_PROFILE, AArch64::AEK_FLAGM, AArch64::AEK_PAUTH,
- AArch64::AEK_FP16FML}))},
+ AArch64::AEK_PROFILE, AArch64::AEK_FLAGM, AArch64::AEK_PAUTH}))},
{"cortex-a710", ARMV9A,
(AArch64::ExtensionBitset(
{AArch64::AEK_MTE, AArch64::AEK_PAUTH, AArch64::AEK_FLAGM,
@@ -514,13 +513,13 @@ inline constexpr CpuInfo CpuInfos[] = {
(AArch64::ExtensionBitset(
{AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16,
AArch64::AEK_DOTPROD, AArch64::AEK_RCPC, AArch64::AEK_SSBS,
- AArch64::AEK_PAUTH, AArch64::AEK_PROFILE}))},
+ AArch64::AEK_PAUTH, AArch64::AEK_PROFILE, AArch64::AEK_FLAGM}))},
{"cortex-x2", ARMV9A,
(AArch64::ExtensionBitset(
{AArch64::AEK_MTE, AArch64::AEK_BF16, AArch64::AEK_I8MM,
AArch64::AEK_PAUTH, AArch64::AEK_SSBS, AArch64::AEK_SB,
AArch64::AEK_SVE, AArch64::AEK_SVE2, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_FP16FML}))},
+ AArch64::AEK_FP16FML, AArch64::AEK_FLAGM}))},
{"cortex-x3", ARMV9A,
(AArch64::ExtensionBitset(
{AArch64::AEK_SVE, AArch64::AEK_PERFMON, AArch64::AEK_PROFILE,
diff --git a/llvm/lib/Target/AArch64/AArch64.td b/llvm/lib/Target/AArch64/AArch64.td
index 68f452039c9b68..d5e8ed101d1cda 100644
--- a/llvm/lib/Target/AArch64/AArch64.td
+++ b/llvm/lib/Target/AArch64/AArch64.td
@@ -1405,7 +1405,7 @@ def ProcessorFeatures {
FeatureSSBS];
list<SubtargetFeature> A78C = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8,
FeatureNEON, FeatureFullFP16, FeatureDotProd,
- FeatureFlagM, FeatureFP16FML, FeaturePAuth,
+ FeatureFlagM, FeaturePAuth,
FeaturePerfMon, FeatureRCPC, FeatureSPE,
FeatureSSBS];
list<SubtargetFeature> A710 = [HasV9_0aOps, FeatureNEON, FeaturePerfMon,
diff --git a/llvm/unittests/TargetParser/TargetParserTest.cpp b/llvm/unittests/TargetParser/TargetParserTest.cpp
index 92bd4da1d3a471..6b2cbb33ba8d00 100644
--- a/llvm/unittests/TargetParser/TargetParserTest.cpp
+++ b/llvm/unittests/TargetParser/TargetParserTest.cpp
@@ -1197,7 +1197,7 @@ INSTANTIATE_TEST_SUITE_P(
AArch64::AEK_RAS, AArch64::AEK_LSE, AArch64::AEK_RDM,
AArch64::AEK_FP16, AArch64::AEK_DOTPROD, AArch64::AEK_RCPC,
AArch64::AEK_SSBS, AArch64::AEK_PROFILE, AArch64::AEK_FLAGM,
- AArch64::AEK_PAUTH, AArch64::AEK_FP16FML})),
+ AArch64::AEK_PAUTH})),
"8.2-A"),
ARMCPUTestParams<AArch64::ExtensionBitset>(
"cortex-a710", "armv9-a", "neon-fp-armv8",
@@ -1289,7 +1289,7 @@ INSTANTIATE_TEST_SUITE_P(
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,
- AArch64::AEK_PAUTH, AArch64::AEK_PROFILE})),
+ AArch64::AEK_PAUTH, AArch64::AEK_PROFILE, AArch64::AEK_FLAGM})),
"8.2-A"),
ARMCPUTestParams<AArch64::ExtensionBitset>(
"cortex-x2", "armv9-a", "neon-fp-armv8",
@@ -1300,7 +1300,7 @@ INSTANTIATE_TEST_SUITE_P(
AArch64::AEK_PAUTH, AArch64::AEK_I8MM, AArch64::AEK_BF16,
AArch64::AEK_SVE, AArch64::AEK_SVE2, AArch64::AEK_SVE2BITPERM,
AArch64::AEK_SSBS, AArch64::AEK_SB, AArch64::AEK_FP16,
- AArch64::AEK_FP16FML})),
+ AArch64::AEK_FP16FML, AArch64::AEK_FLAGM})),
"9-A"),
ARMCPUTestParams<AArch64::ExtensionBitset>(
"cortex-x3", "armv9-a", "neon-fp-armv8",
More information about the llvm-commits
mailing list