Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AArch64] Add the Ampere1B core #81297

Merged

Conversation

ptomsich
Copy link
Contributor

@ptomsich ptomsich commented Feb 9, 2024

The Ampere1B is Ampere's third-generation core implementing a superscalar, out-of-order microarchitecture with nested virtualization, speculative side-channel mitigation and architectural support for defense against ROP/JOP style software attacks.

Ampere1B is an ARMv8.7+ implementation, adding support for the FEAT WFxT, FEAT CSSC, FEAT PAN3 and FEAT AFP extensions. It also includes all features of the second-generation Ampere1A, such as the Memory Tagging Extension and SM3/SM4 cryptography instructions.

This provides basic enablement (reusing the scheduling model from Ampere1).
An updated scheduling model will be added as a separate commit.

@llvmbot llvmbot added clang Clang issues not falling into any other category backend:AArch64 clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' mc Machine (object) code labels Feb 9, 2024
@llvmbot
Copy link
Member

llvmbot commented Feb 9, 2024

@llvm/pr-subscribers-clang-driver
@llvm/pr-subscribers-mc
@llvm/pr-subscribers-backend-aarch64

@llvm/pr-subscribers-clang

Author: Philipp Tomsich (ptomsich)

Changes

The Ampere1B is Ampere's third-generation core implementing a superscalar, out-of-order microarchitecture with nested virtualization, speculative side-channel mitigation and architectural support for defense against ROP/JOP style software attacks.

Ampere1B is an ARMv8.7+ implementation, adding support for the FEAT WFxT, FEAT CSSC, FEAT PAN3 and FEAT AFP extensions. It also includes all features of the second-generation Ampere1A, such as the Memory Tagging Extension and SM3/SM4 cryptography instructions.

This provides basic enablement (reusing the scheduling model from Ampere1).
An updated scheduling model will be added as a separate commit.


Full diff: https://github.com/llvm/llvm-project/pull/81297.diff

14 Files Affected:

  • (modified) clang/test/Driver/aarch64-cssc.c (+1)
  • (modified) clang/test/Misc/target-invalid-cpu-note.c (+2-2)
  • (modified) llvm/include/llvm/TargetParser/AArch64TargetParser.h (+14-9)
  • (modified) llvm/lib/Target/AArch64/AArch64.td (+26)
  • (modified) llvm/lib/Target/AArch64/AArch64Subtarget.cpp (+1)
  • (modified) llvm/lib/Target/AArch64/AArch64Subtarget.h (+1)
  • (modified) llvm/lib/TargetParser/Host.cpp (+1)
  • (modified) llvm/test/CodeGen/AArch64/cpus.ll (+1)
  • (modified) llvm/test/CodeGen/AArch64/neon-dot-product.ll (+1)
  • (modified) llvm/test/CodeGen/AArch64/remat.ll (+1)
  • (modified) llvm/test/MC/AArch64/armv8.2a-dotprod.s (+3)
  • (modified) llvm/test/MC/Disassembler/AArch64/armv8.3a-rcpc.txt (+1)
  • (modified) llvm/unittests/TargetParser/Host.cpp (+3)
  • (modified) llvm/unittests/TargetParser/TargetParserTest.cpp (+13-1)
diff --git a/clang/test/Driver/aarch64-cssc.c b/clang/test/Driver/aarch64-cssc.c
index a3e18663279bbd..5df0ea79d7c850 100644
--- a/clang/test/Driver/aarch64-cssc.c
+++ b/clang/test/Driver/aarch64-cssc.c
@@ -9,6 +9,7 @@
 // RUN: %clang -S -o - -emit-llvm --target=aarch64-none-elf -march=armv9.4-a        %s 2>&1 | FileCheck %s
 // RUN: %clang -S -o - -emit-llvm --target=aarch64-none-elf -march=armv9.4-a+cssc   %s 2>&1 | FileCheck %s
 // RUN: %clang -S -o - -emit-llvm --target=aarch64-none-elf -march=armv9.4-a+nocssc %s 2>&1 | FileCheck %s --check-prefix=NO_CSSC
+// RUN: %clang -S -o - -emit-llvm --target=aarch64-none-elf -mcpu=ampere1b          %s 2>&1 | FileCheck %s
 
 // CHECK: "target-features"="{{.*}},+cssc
 // NO_CSSC: "target-features"="{{.*}},-cssc
diff --git a/clang/test/Misc/target-invalid-cpu-note.c b/clang/test/Misc/target-invalid-cpu-note.c
index 2f10bfb1fd82fe..39ed02f50950dd 100644
--- a/clang/test/Misc/target-invalid-cpu-note.c
+++ b/clang/test/Misc/target-invalid-cpu-note.c
@@ -5,11 +5,11 @@
 
 // RUN: not %clang_cc1 -triple arm64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix AARCH64
 // AARCH64: error: unknown target CPU 'not-a-cpu'
-// AARCH64-NEXT: note: valid target CPU values are: cortex-a34, cortex-a35, cortex-a53, cortex-a55, cortex-a510, cortex-a520, cortex-a57, cortex-a65, cortex-a65ae, cortex-a72, cortex-a73, cortex-a75, cortex-a76, cortex-a76ae, cortex-a77, cortex-a78, cortex-a78c, cortex-a710, cortex-a715, cortex-a720, cortex-r82, cortex-x1, cortex-x1c, cortex-x2, cortex-x3, cortex-x4, neoverse-e1, neoverse-n1, neoverse-n2, neoverse-512tvb, neoverse-v1, neoverse-v2, cyclone, apple-a7, apple-a8, apple-a9, apple-a10, apple-a11, apple-a12, apple-a13, apple-a14, apple-a15, apple-a16, apple-a17, apple-m1, apple-m2, apple-m3, apple-s4, apple-s5, exynos-m3, exynos-m4, exynos-m5, falkor, saphira, kryo, thunderx2t99, thunderx3t110, thunderx, thunderxt88, thunderxt81, thunderxt83, tsv110, a64fx, carmel, ampere1, ampere1a, cobalt-100, grace{{$}}
+// AARCH64-NEXT: note: valid target CPU values are: cortex-a34, cortex-a35, cortex-a53, cortex-a55, cortex-a510, cortex-a520, cortex-a57, cortex-a65, cortex-a65ae, cortex-a72, cortex-a73, cortex-a75, cortex-a76, cortex-a76ae, cortex-a77, cortex-a78, cortex-a78c, cortex-a710, cortex-a715, cortex-a720, cortex-r82, cortex-x1, cortex-x1c, cortex-x2, cortex-x3, cortex-x4, neoverse-e1, neoverse-n1, neoverse-n2, neoverse-512tvb, neoverse-v1, neoverse-v2, cyclone, apple-a7, apple-a8, apple-a9, apple-a10, apple-a11, apple-a12, apple-a13, apple-a14, apple-a15, apple-a16, apple-a17, apple-m1, apple-m2, apple-m3, apple-s4, apple-s5, exynos-m3, exynos-m4, exynos-m5, falkor, saphira, kryo, thunderx2t99, thunderx3t110, thunderx, thunderxt88, thunderxt81, thunderxt83, tsv110, a64fx, carmel, ampere1, ampere1a, ampere1b, cobalt-100, grace{{$}}
 
 // RUN: not %clang_cc1 -triple arm64--- -tune-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix TUNE_AARCH64
 // TUNE_AARCH64: error: unknown target CPU 'not-a-cpu'
-// TUNE_AARCH64-NEXT: note: valid target CPU values are: cortex-a34, cortex-a35, cortex-a53, cortex-a55, cortex-a510, cortex-a520, cortex-a57, cortex-a65, cortex-a65ae, cortex-a72, cortex-a73, cortex-a75, cortex-a76, cortex-a76ae, cortex-a77, cortex-a78, cortex-a78c, cortex-a710, cortex-a715, cortex-a720, cortex-r82, cortex-x1, cortex-x1c, cortex-x2, cortex-x3, cortex-x4, neoverse-e1, neoverse-n1, neoverse-n2, neoverse-512tvb, neoverse-v1, neoverse-v2, cyclone, apple-a7, apple-a8, apple-a9, apple-a10, apple-a11, apple-a12, apple-a13, apple-a14, apple-a15, apple-a16, apple-a17, apple-m1, apple-m2, apple-m3, apple-s4, apple-s5, exynos-m3, exynos-m4, exynos-m5, falkor, saphira, kryo, thunderx2t99, thunderx3t110, thunderx, thunderxt88, thunderxt81, thunderxt83, tsv110, a64fx, carmel, ampere1, ampere1a, cobalt-100, grace{{$}}
+// TUNE_AARCH64-NEXT: note: valid target CPU values are: cortex-a34, cortex-a35, cortex-a53, cortex-a55, cortex-a510, cortex-a520, cortex-a57, cortex-a65, cortex-a65ae, cortex-a72, cortex-a73, cortex-a75, cortex-a76, cortex-a76ae, cortex-a77, cortex-a78, cortex-a78c, cortex-a710, cortex-a715, cortex-a720, cortex-r82, cortex-x1, cortex-x1c, cortex-x2, cortex-x3, cortex-x4, neoverse-e1, neoverse-n1, neoverse-n2, neoverse-512tvb, neoverse-v1, neoverse-v2, cyclone, apple-a7, apple-a8, apple-a9, apple-a10, apple-a11, apple-a12, apple-a13, apple-a14, apple-a15, apple-a16, apple-a17, apple-m1, apple-m2, apple-m3, apple-s4, apple-s5, exynos-m3, exynos-m4, exynos-m5, falkor, saphira, kryo, thunderx2t99, thunderx3t110, thunderx, thunderxt88, thunderxt81, thunderxt83, tsv110, a64fx, carmel, ampere1, ampere1a, ampere1b, cobalt-100, grace{{$}}
 
 // RUN: not %clang_cc1 -triple i386--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix X86
 // X86: error: unknown target CPU 'not-a-cpu'
diff --git a/llvm/include/llvm/TargetParser/AArch64TargetParser.h b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
index cce9d6db260d75..db9519cfa6e43b 100644
--- a/llvm/include/llvm/TargetParser/AArch64TargetParser.h
+++ b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
@@ -784,27 +784,32 @@ inline constexpr CpuInfo CpuInfos[] = {
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC}))},
     {"tsv110", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_DOTPROD,
-          AArch64::AEK_FP16, AArch64::AEK_FP16FML, AArch64::AEK_PROFILE,
-          AArch64::AEK_JSCVT, AArch64::AEK_FCMA}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
+                                AArch64::AEK_FP16FML, AArch64::AEK_PROFILE,
+                                AArch64::AEK_JSCVT, AArch64::AEK_FCMA}))},
     {"a64fx", ARMV8_2A,
      (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
-                                           AArch64::AEK_FP16,
-                                           AArch64::AEK_SVE}))},
+                                AArch64::AEK_FP16, AArch64::AEK_SVE}))},
     {"carmel", ARMV8_2A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16}))},
     {"ampere1", ARMV8_6A,
      (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
-                                           AArch64::AEK_SHA3, AArch64::AEK_FP16,
-                                           AArch64::AEK_SB, AArch64::AEK_SSBS,
-                                           AArch64::AEK_RAND}))},
+                                AArch64::AEK_SHA3, AArch64::AEK_FP16,
+                                AArch64::AEK_SB, AArch64::AEK_SSBS,
+                                AArch64::AEK_RAND}))},
     {"ampere1a", ARMV8_6A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_FP16, AArch64::AEK_RAND, AArch64::AEK_SM4,
           AArch64::AEK_SHA3, AArch64::AEK_SHA2, AArch64::AEK_AES,
           AArch64::AEK_MTE, AArch64::AEK_SB, AArch64::AEK_SSBS}))},
+    {"ampere1b", ARMV8_7A,
+     (AArch64::ExtensionBitset({AArch64::AEK_FP16, AArch64::AEK_RAND,
+                                AArch64::AEK_SM4, AArch64::AEK_SHA3,
+                                AArch64::AEK_SHA2, AArch64::AEK_AES,
+                                AArch64::AEK_MTE, AArch64::AEK_SB,
+                                AArch64::AEK_SSBS, AArch64::AEK_CSSC}))},
 };
 
 // An alias for a CPU.
diff --git a/llvm/lib/Target/AArch64/AArch64.td b/llvm/lib/Target/AArch64/AArch64.td
index 02fb01caf7e801..00833b419ec32c 100644
--- a/llvm/lib/Target/AArch64/AArch64.td
+++ b/llvm/lib/Target/AArch64/AArch64.td
@@ -1376,6 +1376,24 @@ def TuneAmpere1A : SubtargetFeature<"ampere1a", "ARMProcFamily", "Ampere1A",
                                     FeatureLdpAlignedOnly,
                                     FeatureStpAlignedOnly]>;
 
+def TuneAmpere1B : SubtargetFeature<"ampere1b", "ARMProcFamily", "Ampere1B",
+                                    "Ampere Computing Ampere-1B processors", [
+                                    FeaturePostRAScheduler,
+                                    FeatureFuseAES,
+                                    FeatureFuseAdrpAdd,
+                                    FeatureAddrLSLFast,
+                                    FeatureALULSLFast,
+                                    FeatureAggressiveFMA,
+                                    FeatureArithmeticBccFusion,
+                                    FeatureCmpBccFusion,
+                                    FeatureFuseAddress,
+                                    FeatureFuseLiterals,
+                                    FeatureStorePairSuppress,
+                                    FeatureEnableSelectOptimize,
+                                    FeaturePredictableSelectIsExpensive,
+                                    FeatureLdpAlignedOnly,
+                                    FeatureStpAlignedOnly]>;
+
 def ProcessorFeatures {
   list<SubtargetFeature> A53  = [HasV8_0aOps, FeatureCRC, FeatureCrypto,
                                  FeatureFPARMv8, FeatureNEON, FeaturePerfMon];
@@ -1530,6 +1548,11 @@ def ProcessorFeatures {
                                      FeatureMTE, FeatureSSBS, FeatureRandGen,
                                      FeatureSB, FeatureSM4, FeatureSHA2,
                                      FeatureSHA3, FeatureAES];
+  list<SubtargetFeature> Ampere1B = [HasV8_7aOps, FeatureNEON, FeaturePerfMon,
+                                     FeatureMTE, FeatureSSBS, FeatureRandGen,
+                                     FeatureSB, FeatureSM4, FeatureSHA2,
+                                     FeatureSHA3, FeatureAES, FeatureCSSC,
+                                     FeatureWFxT];
 
   // ETE and TRBE are future architecture extensions. We temporarily enable them
   // by default for users targeting generic AArch64. The extensions do not
@@ -1697,6 +1720,9 @@ def : ProcessorModel<"ampere1", Ampere1Model, ProcessorFeatures.Ampere1,
 def : ProcessorModel<"ampere1a", Ampere1Model, ProcessorFeatures.Ampere1A,
                      [TuneAmpere1A]>;
 
+def : ProcessorModel<"ampere1b", Ampere1Model, ProcessorFeatures.Ampere1B,
+                     [TuneAmpere1B]>;
+
 //===----------------------------------------------------------------------===//
 // Assembly parser
 //===----------------------------------------------------------------------===//
diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
index 6550c127221660..2b01deb0cca191 100644
--- a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
+++ b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
@@ -296,6 +296,7 @@ void AArch64Subtarget::initializeProperties(bool HasMinSize) {
     break;
   case Ampere1:
   case Ampere1A:
+  case Ampere1B:
     CacheLineSize = 64;
     PrefFunctionAlignment = Align(64);
     PrefLoopAlignment = Align(64);
diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.h b/llvm/lib/Target/AArch64/AArch64Subtarget.h
index 0292c018f1dbc1..01cc4713849f40 100644
--- a/llvm/lib/Target/AArch64/AArch64Subtarget.h
+++ b/llvm/lib/Target/AArch64/AArch64Subtarget.h
@@ -42,6 +42,7 @@ class AArch64Subtarget final : public AArch64GenSubtargetInfo {
     A64FX,
     Ampere1,
     Ampere1A,
+    Ampere1B,
     AppleA7,
     AppleA10,
     AppleA11,
diff --git a/llvm/lib/TargetParser/Host.cpp b/llvm/lib/TargetParser/Host.cpp
index f1197c29655380..4466d50458e198 100644
--- a/llvm/lib/TargetParser/Host.cpp
+++ b/llvm/lib/TargetParser/Host.cpp
@@ -321,6 +321,7 @@ StringRef sys::detail::getHostCPUNameForARM(StringRef ProcCpuinfoContent) {
     return StringSwitch<const char *>(Part)
         .Case("0xac3", "ampere1")
         .Case("0xac4", "ampere1a")
+        .Case("0xac5", "ampere1b")
         .Default("generic");
   }
 
diff --git a/llvm/test/CodeGen/AArch64/cpus.ll b/llvm/test/CodeGen/AArch64/cpus.ll
index b24866064efaea..7b45d0f30bcdd4 100644
--- a/llvm/test/CodeGen/AArch64/cpus.ll
+++ b/llvm/test/CodeGen/AArch64/cpus.ll
@@ -37,6 +37,7 @@
 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=a64fx 2>&1 | FileCheck %s
 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=ampere1 2>&1 | FileCheck %s
 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=ampere1a 2>&1 | FileCheck %s
+; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=ampere1b 2>&1 | FileCheck %s
 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=invalidcpu 2>&1 | FileCheck %s --check-prefix=INVALID
 
 ; CHECK-NOT: {{.*}}  is not a recognized processor for this target
diff --git a/llvm/test/CodeGen/AArch64/neon-dot-product.ll b/llvm/test/CodeGen/AArch64/neon-dot-product.ll
index 23d1e43a5cab1b..cf09a46000dab9 100644
--- a/llvm/test/CodeGen/AArch64/neon-dot-product.ll
+++ b/llvm/test/CodeGen/AArch64/neon-dot-product.ll
@@ -7,6 +7,7 @@
 ; RUN: llc -mtriple aarch64-none-linux-gnu -mcpu=neoverse-n2  < %s | FileCheck %s
 ; RUN: llc -mtriple aarch64-none-linux-gnu -mcpu=ampere1      < %s | FileCheck %s
 ; RUN: llc -mtriple aarch64-none-linux-gnu -mcpu=ampere1a     < %s | FileCheck %s
+; RUN: llc -mtriple aarch64-none-linux-gnu -mcpu=ampere1b     < %s | FileCheck %s
 
 declare <2 x i32> @llvm.aarch64.neon.udot.v2i32.v8i8(<2 x i32>, <8 x i8>, <8 x i8>)
 declare <4 x i32> @llvm.aarch64.neon.udot.v4i32.v16i8(<4 x i32>, <16 x i8>, <16 x i8>)
diff --git a/llvm/test/CodeGen/AArch64/remat.ll b/llvm/test/CodeGen/AArch64/remat.ll
index 483c4d71ee21fb..704c87feb6a9b8 100644
--- a/llvm/test/CodeGen/AArch64/remat.ll
+++ b/llvm/test/CodeGen/AArch64/remat.ll
@@ -26,6 +26,7 @@
 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=thunderx3t110 -o - %s | FileCheck %s
 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=ampere1 -o - %s | FileCheck %s
 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=ampere1a -o - %s | FileCheck %s
+; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=ampere1b -o - %s | FileCheck %s
 
 %X = type { i64, i64, i64 }
 declare void @f(ptr)
diff --git a/llvm/test/MC/AArch64/armv8.2a-dotprod.s b/llvm/test/MC/AArch64/armv8.2a-dotprod.s
index a49ed14d8677aa..4d96409067a2e1 100644
--- a/llvm/test/MC/AArch64/armv8.2a-dotprod.s
+++ b/llvm/test/MC/AArch64/armv8.2a-dotprod.s
@@ -15,6 +15,7 @@
 // RUN: llvm-mc -triple aarch64 -mattr=+v8r,+dotprod -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
 // RUN: llvm-mc -triple aarch64 -mcpu=ampere1 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
 // RUN: llvm-mc -triple aarch64 -mcpu=ampere1a -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
+// RUN: llvm-mc -triple aarch64 -mcpu=ampere1b -show-encoding < %s | FileCheck %s --check-prefix=CHECK-DOTPROD
 
 // RUN: not llvm-mc -triple aarch64 -mattr=+v8.2a -show-encoding < %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-NO-DOTPROD < %t %s
@@ -42,6 +43,8 @@
 // RUN: FileCheck --check-prefix=CHECK-NO-DOTPROD < %t %s
 // RUN: not llvm-mc -triple aarch64 -mcpu=ampere1a -mattr=-dotprod -show-encoding < %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-NO-DOTPROD < %t %s
+// RUN: not llvm-mc -triple aarch64 -mcpu=ampere1b -mattr=-dotprod -show-encoding < %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-NO-DOTPROD < %t %s
 
 udot v0.2s, v1.8b, v2.8b
 sdot v0.2s, v1.8b, v2.8b
diff --git a/llvm/test/MC/Disassembler/AArch64/armv8.3a-rcpc.txt b/llvm/test/MC/Disassembler/AArch64/armv8.3a-rcpc.txt
index 907d0c319efd57..259cb9dbc52a46 100644
--- a/llvm/test/MC/Disassembler/AArch64/armv8.3a-rcpc.txt
+++ b/llvm/test/MC/Disassembler/AArch64/armv8.3a-rcpc.txt
@@ -14,6 +14,7 @@
 # RUN: llvm-mc -triple aarch64-none-linux-gnu -mcpu=neoverse-n2 --disassemble < %s | FileCheck %s
 # RUN: llvm-mc -triple aarch64-none-linux-gnu -mcpu=ampere1 --disassemble < %s | FileCheck %s
 # RUN: llvm-mc -triple aarch64-none-linux-gnu -mcpu=ampere1a --disassemble < %s | FileCheck %s
+# RUN: llvm-mc -triple aarch64-none-linux-gnu -mcpu=ampere1b --disassemble < %s | FileCheck %s
 
 # CHECK: ldaprb w0, [x0]
 # CHECK: ldaprh w0, [x0]
diff --git a/llvm/unittests/TargetParser/Host.cpp b/llvm/unittests/TargetParser/Host.cpp
index 5f151616d7ca6a..6aa1d7a087ebf0 100644
--- a/llvm/unittests/TargetParser/Host.cpp
+++ b/llvm/unittests/TargetParser/Host.cpp
@@ -122,6 +122,9 @@ TEST(getLinuxHostCPUName, AArch64) {
   EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0xc0\n"
                                               "CPU part        : 0xac4"),
             "ampere1a");
+  EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0xc0\n"
+                                              "CPU part        : 0xac5"),
+            "ampere1b");
 
   // MSM8992/4 weirdness
   StringRef MSM8992ProcCpuInfo = R"(
diff --git a/llvm/unittests/TargetParser/TargetParserTest.cpp b/llvm/unittests/TargetParser/TargetParserTest.cpp
index e7f997304eb4bc..e89fc687451cd7 100644
--- a/llvm/unittests/TargetParser/TargetParserTest.cpp
+++ b/llvm/unittests/TargetParser/TargetParserTest.cpp
@@ -1600,6 +1600,18 @@ INSTANTIATE_TEST_SUITE_P(
                  AArch64::AEK_MTE, AArch64::AEK_JSCVT, AArch64::AEK_FCMA,
                  AArch64::AEK_PAUTH})),
             "8.6-A"),
+        ARMCPUTestParams<AArch64::ExtensionBitset>(
+            "ampere1b", "armv8.7-a", "crypto-neon-fp-armv8",
+            (AArch64::ExtensionBitset(
+                {AArch64::AEK_CRC,   AArch64::AEK_FP,    AArch64::AEK_FP16,
+                 AArch64::AEK_SIMD,  AArch64::AEK_RAS,   AArch64::AEK_LSE,
+                 AArch64::AEK_RDM,   AArch64::AEK_RCPC,  AArch64::AEK_DOTPROD,
+                 AArch64::AEK_SM4,   AArch64::AEK_SHA3,  AArch64::AEK_BF16,
+                 AArch64::AEK_SHA2,  AArch64::AEK_AES,   AArch64::AEK_I8MM,
+                 AArch64::AEK_SSBS,  AArch64::AEK_SB,    AArch64::AEK_RAND,
+                 AArch64::AEK_MTE,   AArch64::AEK_JSCVT, AArch64::AEK_FCMA,
+                 AArch64::AEK_PAUTH, AArch64::AEK_CSSC})),
+            "8.7-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "neoverse-512tvb", "armv8.4-a", "crypto-neon-fp-armv8",
             (AArch64::ExtensionBitset(
@@ -1679,7 +1691,7 @@ INSTANTIATE_TEST_SUITE_P(
     ARMCPUTestParams<AArch64::ExtensionBitset>::PrintToStringParamName);
 
 // Note: number of CPUs includes aliases.
-static constexpr unsigned NumAArch64CPUArchs = 68;
+static constexpr unsigned NumAArch64CPUArchs = 69;
 
 TEST(TargetParserTest, testAArch64CPUArchList) {
   SmallVector<StringRef, NumAArch64CPUArchs> List;

Copy link

github-actions bot commented Feb 9, 2024

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff d86f21693c5fb8eaa597cfcb15813ffc52d00847 257576aca04412413318b0a14f096c3616db7cd9 -- clang/test/Driver/aarch64-cssc.c clang/test/Misc/target-invalid-cpu-note.c llvm/include/llvm/TargetParser/AArch64TargetParser.h llvm/lib/Target/AArch64/AArch64Subtarget.cpp llvm/lib/Target/AArch64/AArch64Subtarget.h llvm/lib/TargetParser/Host.cpp llvm/unittests/TargetParser/Host.cpp llvm/unittests/TargetParser/TargetParserTest.cpp
View the diff from clang-format here.
diff --git a/llvm/include/llvm/TargetParser/AArch64TargetParser.h b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
index ed9944bcef..42fa92d8a4 100644
--- a/llvm/include/llvm/TargetParser/AArch64TargetParser.h
+++ b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
@@ -540,9 +540,9 @@ inline constexpr CpuInfo CpuInfos[] = {
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC}))},
     {"cortex-a55", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16,
-          AArch64::AEK_DOTPROD, AArch64::AEK_RCPC}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
+                                AArch64::AEK_RCPC}))},
     {"cortex-a510", ARMV9A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_BF16, AArch64::AEK_I8MM, AArch64::AEK_SB,
@@ -558,13 +558,13 @@ inline constexpr CpuInfo CpuInfos[] = {
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC}))},
     {"cortex-a65", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_DOTPROD,
-          AArch64::AEK_FP16, AArch64::AEK_RCPC, AArch64::AEK_SSBS}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
+                                AArch64::AEK_RCPC, AArch64::AEK_SSBS}))},
     {"cortex-a65ae", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_DOTPROD,
-          AArch64::AEK_FP16, AArch64::AEK_RCPC, AArch64::AEK_SSBS}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
+                                AArch64::AEK_RCPC, AArch64::AEK_SSBS}))},
     {"cortex-a72", ARMV8A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC}))},
@@ -572,37 +572,38 @@ inline constexpr CpuInfo CpuInfos[] = {
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC}))},
     {"cortex-a75", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16,
-          AArch64::AEK_DOTPROD, AArch64::AEK_RCPC}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
+                                AArch64::AEK_RCPC}))},
     {"cortex-a76", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16,
-          AArch64::AEK_DOTPROD, AArch64::AEK_RCPC, AArch64::AEK_SSBS}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
+                                AArch64::AEK_RCPC, AArch64::AEK_SSBS}))},
     {"cortex-a76ae", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16,
-          AArch64::AEK_DOTPROD, AArch64::AEK_RCPC, AArch64::AEK_SSBS}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
+                                AArch64::AEK_RCPC, AArch64::AEK_SSBS}))},
     {"cortex-a77", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16,
-          AArch64::AEK_RCPC, AArch64::AEK_DOTPROD, AArch64::AEK_SSBS}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_FP16, AArch64::AEK_RCPC,
+                                AArch64::AEK_DOTPROD, AArch64::AEK_SSBS}))},
     {"cortex-a78", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16,
-          AArch64::AEK_DOTPROD, AArch64::AEK_RCPC, AArch64::AEK_SSBS,
-          AArch64::AEK_PROFILE}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
+                                AArch64::AEK_RCPC, AArch64::AEK_SSBS,
+                                AArch64::AEK_PROFILE}))},
     {"cortex-a78c", ARMV8_2A,
-     (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::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}))},
     {"cortex-a710", ARMV9A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_MTE, AArch64::AEK_PAUTH, AArch64::AEK_FLAGM,
-          AArch64::AEK_SB, AArch64::AEK_I8MM, AArch64::AEK_FP16FML,
-          AArch64::AEK_SVE, AArch64::AEK_SVE2, AArch64::AEK_SVE2BITPERM,
-          AArch64::AEK_BF16}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_MTE, AArch64::AEK_PAUTH,
+                                AArch64::AEK_FLAGM, AArch64::AEK_SB,
+                                AArch64::AEK_I8MM, AArch64::AEK_FP16FML,
+                                AArch64::AEK_SVE, AArch64::AEK_SVE2,
+                                AArch64::AEK_SVE2BITPERM, AArch64::AEK_BF16}))},
     {"cortex-a715", ARMV9A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_SB, AArch64::AEK_SSBS, AArch64::AEK_MTE,
@@ -611,23 +612,23 @@ inline constexpr CpuInfo CpuInfos[] = {
           AArch64::AEK_PROFILE, AArch64::AEK_SVE, AArch64::AEK_SVE2BITPERM,
           AArch64::AEK_BF16, AArch64::AEK_FLAGM}))},
     {"cortex-a720", ARMV9_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_SB, AArch64::AEK_SSBS, AArch64::AEK_MTE,
-          AArch64::AEK_FP16FML, AArch64::AEK_PAUTH, AArch64::AEK_SVE2BITPERM,
-          AArch64::AEK_FLAGM, AArch64::AEK_PERFMON, AArch64::AEK_PREDRES,
-          AArch64::AEK_PROFILE}))},
-    {"cortex-r82", ARMV8R,
-     (AArch64::ExtensionBitset({AArch64::AEK_LSE}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_SB, AArch64::AEK_SSBS,
+                                AArch64::AEK_MTE, AArch64::AEK_FP16FML,
+                                AArch64::AEK_PAUTH, AArch64::AEK_SVE2BITPERM,
+                                AArch64::AEK_FLAGM, AArch64::AEK_PERFMON,
+                                AArch64::AEK_PREDRES, AArch64::AEK_PROFILE}))},
+    {"cortex-r82", ARMV8R, (AArch64::ExtensionBitset({AArch64::AEK_LSE}))},
     {"cortex-x1", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16,
-          AArch64::AEK_DOTPROD, AArch64::AEK_RCPC, AArch64::AEK_SSBS,
-          AArch64::AEK_PROFILE}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
+                                AArch64::AEK_RCPC, AArch64::AEK_SSBS,
+                                AArch64::AEK_PROFILE}))},
     {"cortex-x1c", ARMV8_2A,
-     (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_FLAGM}))},
+     (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_FLAGM}))},
     {"cortex-x2", ARMV9A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_MTE, AArch64::AEK_BF16, AArch64::AEK_I8MM,
@@ -642,26 +643,26 @@ inline constexpr CpuInfo CpuInfos[] = {
           AArch64::AEK_FP16, AArch64::AEK_FP16FML, AArch64::AEK_PREDRES,
           AArch64::AEK_FLAGM, AArch64::AEK_SSBS}))},
     {"cortex-x4", ARMV9_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_SB, AArch64::AEK_SSBS, AArch64::AEK_MTE,
-          AArch64::AEK_FP16FML, AArch64::AEK_PAUTH, AArch64::AEK_SVE2BITPERM,
-          AArch64::AEK_FLAGM, AArch64::AEK_PERFMON, AArch64::AEK_PREDRES,
-          AArch64::AEK_PROFILE}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_SB, AArch64::AEK_SSBS,
+                                AArch64::AEK_MTE, AArch64::AEK_FP16FML,
+                                AArch64::AEK_PAUTH, AArch64::AEK_SVE2BITPERM,
+                                AArch64::AEK_FLAGM, AArch64::AEK_PERFMON,
+                                AArch64::AEK_PREDRES, AArch64::AEK_PROFILE}))},
     {"neoverse-e1", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_DOTPROD,
-          AArch64::AEK_FP16, AArch64::AEK_RCPC, AArch64::AEK_SSBS}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
+                                AArch64::AEK_RCPC, AArch64::AEK_SSBS}))},
     {"neoverse-n1", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_DOTPROD,
-          AArch64::AEK_FP16, AArch64::AEK_PROFILE, AArch64::AEK_RCPC,
-          AArch64::AEK_SSBS}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
+                                AArch64::AEK_PROFILE, AArch64::AEK_RCPC,
+                                AArch64::AEK_SSBS}))},
     {"neoverse-n2", ARMV9A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_BF16, AArch64::AEK_DOTPROD,
-          AArch64::AEK_FP16, AArch64::AEK_I8MM, AArch64::AEK_MTE,
-          AArch64::AEK_SB, AArch64::AEK_SSBS, AArch64::AEK_SVE,
-          AArch64::AEK_SVE2, AArch64::AEK_SVE2BITPERM}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_BF16, AArch64::AEK_DOTPROD,
+                                AArch64::AEK_FP16, AArch64::AEK_I8MM,
+                                AArch64::AEK_MTE, AArch64::AEK_SB,
+                                AArch64::AEK_SSBS, AArch64::AEK_SVE,
+                                AArch64::AEK_SVE2, AArch64::AEK_SVE2BITPERM}))},
     {"neoverse-512tvb", ARMV8_4A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3,
@@ -696,8 +697,7 @@ inline constexpr CpuInfo CpuInfos[] = {
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_NONE}))},
     {"apple-a10", ARMV8A,
      (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
-                                           AArch64::AEK_CRC,
-                                           AArch64::AEK_RDM}))},
+                                AArch64::AEK_CRC, AArch64::AEK_RDM}))},
     {"apple-a11", ARMV8_2A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16}))},
@@ -705,38 +705,38 @@ inline constexpr CpuInfo CpuInfos[] = {
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16}))},
     {"apple-a13", ARMV8_4A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3,
-          AArch64::AEK_FP16, AArch64::AEK_FP16FML}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_SHA3, AArch64::AEK_FP16,
+                                AArch64::AEK_FP16FML}))},
     {"apple-a14", ARMV8_5A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3,
-          AArch64::AEK_FP16, AArch64::AEK_FP16FML}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_SHA3, AArch64::AEK_FP16,
+                                AArch64::AEK_FP16FML}))},
     {"apple-a15", ARMV8_6A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3,
-          AArch64::AEK_FP16, AArch64::AEK_FP16FML}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_SHA3, AArch64::AEK_FP16,
+                                AArch64::AEK_FP16FML}))},
     {"apple-a16", ARMV8_6A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3,
-          AArch64::AEK_FP16, AArch64::AEK_FP16FML}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_SHA3, AArch64::AEK_FP16,
+                                AArch64::AEK_FP16FML}))},
     {"apple-a17", ARMV8_6A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3,
-          AArch64::AEK_FP16, AArch64::AEK_FP16FML}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_SHA3, AArch64::AEK_FP16,
+                                AArch64::AEK_FP16FML}))},
 
     {"apple-m1", ARMV8_5A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3,
-          AArch64::AEK_FP16, AArch64::AEK_FP16FML}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_SHA3, AArch64::AEK_FP16,
+                                AArch64::AEK_FP16FML}))},
     {"apple-m2", ARMV8_6A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3,
-          AArch64::AEK_FP16, AArch64::AEK_FP16FML}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_SHA3, AArch64::AEK_FP16,
+                                AArch64::AEK_FP16FML}))},
     {"apple-m3", ARMV8_6A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3,
-          AArch64::AEK_FP16, AArch64::AEK_FP16FML}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_SHA3, AArch64::AEK_FP16,
+                                AArch64::AEK_FP16FML}))},
 
     {"apple-s4", ARMV8_3A,
      (AArch64::ExtensionBitset(
@@ -749,16 +749,13 @@ inline constexpr CpuInfo CpuInfos[] = {
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC}))},
     {"exynos-m4", ARMV8_2A,
      (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
-                                           AArch64::AEK_DOTPROD,
-                                           AArch64::AEK_FP16}))},
+                                AArch64::AEK_DOTPROD, AArch64::AEK_FP16}))},
     {"exynos-m5", ARMV8_2A,
      (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
-                                           AArch64::AEK_DOTPROD,
-                                           AArch64::AEK_FP16}))},
+                                AArch64::AEK_DOTPROD, AArch64::AEK_FP16}))},
     {"falkor", ARMV8A,
      (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
-                                           AArch64::AEK_CRC,
-                                           AArch64::AEK_RDM}))},
+                                AArch64::AEK_CRC, AArch64::AEK_RDM}))},
     {"saphira", ARMV8_3A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_PROFILE}))},
@@ -766,11 +763,9 @@ inline constexpr CpuInfo CpuInfos[] = {
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC}))},
     {"thunderx2t99", ARMV8_1A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2}))},
     {"thunderx3t110", ARMV8_3A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2}))},
     {"thunderx", ARMV8A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC}))},
@@ -784,22 +779,21 @@ inline constexpr CpuInfo CpuInfos[] = {
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC}))},
     {"tsv110", ARMV8_2A,
-     (AArch64::ExtensionBitset(
-         {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_DOTPROD,
-          AArch64::AEK_FP16, AArch64::AEK_FP16FML, AArch64::AEK_PROFILE,
-          AArch64::AEK_JSCVT, AArch64::AEK_FCMA}))},
+     (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
+                                AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
+                                AArch64::AEK_FP16FML, AArch64::AEK_PROFILE,
+                                AArch64::AEK_JSCVT, AArch64::AEK_FCMA}))},
     {"a64fx", ARMV8_2A,
      (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
-                                           AArch64::AEK_FP16,
-                                           AArch64::AEK_SVE}))},
+                                AArch64::AEK_FP16, AArch64::AEK_SVE}))},
     {"carmel", ARMV8_2A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16}))},
     {"ampere1", ARMV8_6A,
      (AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
-                                           AArch64::AEK_SHA3, AArch64::AEK_FP16,
-                                           AArch64::AEK_SB, AArch64::AEK_SSBS,
-                                           AArch64::AEK_RAND}))},
+                                AArch64::AEK_SHA3, AArch64::AEK_FP16,
+                                AArch64::AEK_SB, AArch64::AEK_SSBS,
+                                AArch64::AEK_RAND}))},
     {"ampere1a", ARMV8_6A,
      (AArch64::ExtensionBitset(
          {AArch64::AEK_FP16, AArch64::AEK_RAND, AArch64::AEK_SM4,
diff --git a/llvm/unittests/TargetParser/TargetParserTest.cpp b/llvm/unittests/TargetParser/TargetParserTest.cpp
index e89fc68745..e4d2095a59 100644
--- a/llvm/unittests/TargetParser/TargetParserTest.cpp
+++ b/llvm/unittests/TargetParser/TargetParserTest.cpp
@@ -1090,21 +1090,21 @@ INSTANTIATE_TEST_SUITE_P(
     ::testing::Values(
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a34", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a35", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a53", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a55", "armv8.2-a", "crypto-neon-fp-armv8",
@@ -1117,60 +1117,69 @@ INSTANTIATE_TEST_SUITE_P(
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a510", "armv9-a", "neon-fp-armv8",
             (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_FP, AArch64::AEK_SIMD,
-                 AArch64::AEK_RAS, AArch64::AEK_LSE, AArch64::AEK_RDM,
-                 AArch64::AEK_RCPC, AArch64::AEK_DOTPROD, AArch64::AEK_BF16,
-                 AArch64::AEK_I8MM, AArch64::AEK_SVE, AArch64::AEK_SVE2,
-                 AArch64::AEK_SVE2BITPERM, AArch64::AEK_PAUTH, AArch64::AEK_MTE,
-                 AArch64::AEK_SSBS, AArch64::AEK_FP16, AArch64::AEK_FP16FML,
-                 AArch64::AEK_SB, AArch64::AEK_JSCVT, AArch64::AEK_FCMA})),
+                {AArch64::AEK_CRC,         AArch64::AEK_FP,
+                 AArch64::AEK_SIMD,        AArch64::AEK_RAS,
+                 AArch64::AEK_LSE,         AArch64::AEK_RDM,
+                 AArch64::AEK_RCPC,        AArch64::AEK_DOTPROD,
+                 AArch64::AEK_BF16,        AArch64::AEK_I8MM,
+                 AArch64::AEK_SVE,         AArch64::AEK_SVE2,
+                 AArch64::AEK_SVE2BITPERM, AArch64::AEK_PAUTH,
+                 AArch64::AEK_MTE,         AArch64::AEK_SSBS,
+                 AArch64::AEK_FP16,        AArch64::AEK_FP16FML,
+                 AArch64::AEK_SB,          AArch64::AEK_JSCVT,
+                 AArch64::AEK_FCMA})),
             "9-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a520", "armv9.2-a", "crypto-neon-fp-armv8",
             (AArch64::ExtensionBitset(
-                {AArch64::AEK_BF16,  AArch64::AEK_I8MM,  AArch64::AEK_SVE,
-                 AArch64::AEK_SVE2,  AArch64::AEK_FP16,  AArch64::AEK_DOTPROD,
-                 AArch64::AEK_LSE,  AArch64::AEK_RDM,  AArch64::AEK_SIMD,
-                 AArch64::AEK_RCPC,  AArch64::AEK_RAS,  AArch64::AEK_CRC,
-                 AArch64::AEK_FP,  AArch64::AEK_SB,  AArch64::AEK_SSBS,
-                 AArch64::AEK_MTE,  AArch64::AEK_FP16FML,  AArch64::AEK_PAUTH,
-                 AArch64::AEK_SVE2BITPERM,  AArch64::AEK_FLAGM,
-                 AArch64::AEK_PERFMON, AArch64::AEK_PREDRES, AArch64::AEK_JSCVT,
-                 AArch64::AEK_FCMA})),
+                {AArch64::AEK_BF16,        AArch64::AEK_I8MM,
+                 AArch64::AEK_SVE,         AArch64::AEK_SVE2,
+                 AArch64::AEK_FP16,        AArch64::AEK_DOTPROD,
+                 AArch64::AEK_LSE,         AArch64::AEK_RDM,
+                 AArch64::AEK_SIMD,        AArch64::AEK_RCPC,
+                 AArch64::AEK_RAS,         AArch64::AEK_CRC,
+                 AArch64::AEK_FP,          AArch64::AEK_SB,
+                 AArch64::AEK_SSBS,        AArch64::AEK_MTE,
+                 AArch64::AEK_FP16FML,     AArch64::AEK_PAUTH,
+                 AArch64::AEK_SVE2BITPERM, AArch64::AEK_FLAGM,
+                 AArch64::AEK_PERFMON,     AArch64::AEK_PREDRES,
+                 AArch64::AEK_JSCVT,       AArch64::AEK_FCMA})),
             "9.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a57", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a65", "armv8.2-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_DOTPROD, AArch64::AEK_FP, AArch64::AEK_FP16,
-                 AArch64::AEK_LSE, AArch64::AEK_RAS, AArch64::AEK_RCPC,
-                 AArch64::AEK_RDM, AArch64::AEK_SIMD, AArch64::AEK_SSBS})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_DOTPROD,
+                                       AArch64::AEK_FP, AArch64::AEK_FP16,
+                                       AArch64::AEK_LSE, AArch64::AEK_RAS,
+                                       AArch64::AEK_RCPC, AArch64::AEK_RDM,
+                                       AArch64::AEK_SIMD, AArch64::AEK_SSBS})),
             "8.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a65ae", "armv8.2-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_DOTPROD, AArch64::AEK_FP, AArch64::AEK_FP16,
-                 AArch64::AEK_LSE, AArch64::AEK_RAS, AArch64::AEK_RCPC,
-                 AArch64::AEK_RDM, AArch64::AEK_SIMD, AArch64::AEK_SSBS})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_DOTPROD,
+                                       AArch64::AEK_FP, AArch64::AEK_FP16,
+                                       AArch64::AEK_LSE, AArch64::AEK_RAS,
+                                       AArch64::AEK_RCPC, AArch64::AEK_RDM,
+                                       AArch64::AEK_SIMD, AArch64::AEK_SSBS})),
             "8.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a72", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a73", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a75", "armv8.2-a", "crypto-neon-fp-armv8",
@@ -1226,13 +1235,16 @@ INSTANTIATE_TEST_SUITE_P(
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a710", "armv9-a", "neon-fp-armv8",
             (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_FP, AArch64::AEK_SIMD,
-                 AArch64::AEK_RAS, AArch64::AEK_LSE, AArch64::AEK_RDM,
-                 AArch64::AEK_RCPC, AArch64::AEK_DOTPROD, AArch64::AEK_MTE,
-                 AArch64::AEK_FP16, AArch64::AEK_FP16FML, AArch64::AEK_SVE,
-                 AArch64::AEK_SVE2, AArch64::AEK_SVE2BITPERM,
-                 AArch64::AEK_PAUTH, AArch64::AEK_FLAGM, AArch64::AEK_SB,
-                 AArch64::AEK_I8MM, AArch64::AEK_BF16, AArch64::AEK_JSCVT,
+                {AArch64::AEK_CRC,     AArch64::AEK_FP,
+                 AArch64::AEK_SIMD,    AArch64::AEK_RAS,
+                 AArch64::AEK_LSE,     AArch64::AEK_RDM,
+                 AArch64::AEK_RCPC,    AArch64::AEK_DOTPROD,
+                 AArch64::AEK_MTE,     AArch64::AEK_FP16,
+                 AArch64::AEK_FP16FML, AArch64::AEK_SVE,
+                 AArch64::AEK_SVE2,    AArch64::AEK_SVE2BITPERM,
+                 AArch64::AEK_PAUTH,   AArch64::AEK_FLAGM,
+                 AArch64::AEK_SB,      AArch64::AEK_I8MM,
+                 AArch64::AEK_BF16,    AArch64::AEK_JSCVT,
                  AArch64::AEK_FCMA})),
             "9-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
@@ -1255,15 +1267,19 @@ INSTANTIATE_TEST_SUITE_P(
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-a720", "armv9.2-a", "crypto-neon-fp-armv8",
             (AArch64::ExtensionBitset(
-                {AArch64::AEK_BF16,  AArch64::AEK_I8MM,  AArch64::AEK_SVE,
-                 AArch64::AEK_SVE2,  AArch64::AEK_FP16,  AArch64::AEK_DOTPROD,
-                 AArch64::AEK_LSE,  AArch64::AEK_RDM,  AArch64::AEK_SIMD,
-                 AArch64::AEK_RCPC,  AArch64::AEK_RAS,  AArch64::AEK_CRC,
-                 AArch64::AEK_FP,  AArch64::AEK_SB,  AArch64::AEK_SSBS,
-                 AArch64::AEK_MTE,  AArch64::AEK_FP16FML,  AArch64::AEK_PAUTH,
-                 AArch64::AEK_SVE2BITPERM,  AArch64::AEK_FLAGM,
-                 AArch64::AEK_PERFMON, AArch64::AEK_PREDRES,
-                 AArch64::AEK_PROFILE, AArch64::AEK_JSCVT, AArch64::AEK_FCMA})),
+                {AArch64::AEK_BF16,        AArch64::AEK_I8MM,
+                 AArch64::AEK_SVE,         AArch64::AEK_SVE2,
+                 AArch64::AEK_FP16,        AArch64::AEK_DOTPROD,
+                 AArch64::AEK_LSE,         AArch64::AEK_RDM,
+                 AArch64::AEK_SIMD,        AArch64::AEK_RCPC,
+                 AArch64::AEK_RAS,         AArch64::AEK_CRC,
+                 AArch64::AEK_FP,          AArch64::AEK_SB,
+                 AArch64::AEK_SSBS,        AArch64::AEK_MTE,
+                 AArch64::AEK_FP16FML,     AArch64::AEK_PAUTH,
+                 AArch64::AEK_SVE2BITPERM, AArch64::AEK_FLAGM,
+                 AArch64::AEK_PERFMON,     AArch64::AEK_PREDRES,
+                 AArch64::AEK_PROFILE,     AArch64::AEK_JSCVT,
+                 AArch64::AEK_FCMA})),
             "9.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "neoverse-v1", "armv8.4-a", "crypto-neon-fp-armv8",
@@ -1297,11 +1313,12 @@ INSTANTIATE_TEST_SUITE_P(
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-r82", "armv8-r", "crypto-neon-fp-armv8",
             (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_RDM, AArch64::AEK_SSBS,
-                 AArch64::AEK_DOTPROD, AArch64::AEK_FP, AArch64::AEK_SIMD,
-                 AArch64::AEK_FP16, AArch64::AEK_FP16FML, AArch64::AEK_RAS,
-                 AArch64::AEK_RCPC, AArch64::AEK_LSE, AArch64::AEK_SB,
-                 AArch64::AEK_JSCVT, AArch64::AEK_FCMA, AArch64::AEK_PAUTH})),
+                {AArch64::AEK_CRC, AArch64::AEK_RDM,
+                 AArch64::AEK_SSBS, AArch64::AEK_DOTPROD, AArch64::AEK_FP,
+                 AArch64::AEK_SIMD, AArch64::AEK_FP16, AArch64::AEK_FP16FML,
+                 AArch64::AEK_RAS, AArch64::AEK_RCPC, AArch64::AEK_LSE,
+                 AArch64::AEK_SB, AArch64::AEK_JSCVT, AArch64::AEK_FCMA,
+                 AArch64::AEK_PAUTH})),
             "8-R"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-x1", "armv8.2-a", "crypto-neon-fp-armv8",
@@ -1319,19 +1336,23 @@ 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_FLAGM})),
+                 AArch64::AEK_PAUTH, AArch64::AEK_PROFILE,
+                 AArch64::AEK_FLAGM})),
             "8.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-x2", "armv9-a", "neon-fp-armv8",
             (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_FP, AArch64::AEK_SIMD,
-                 AArch64::AEK_RAS, AArch64::AEK_LSE, AArch64::AEK_RDM,
-                 AArch64::AEK_RCPC, AArch64::AEK_DOTPROD, AArch64::AEK_MTE,
-                 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_FLAGM, AArch64::AEK_JSCVT,
-                 AArch64::AEK_FCMA})),
+                {AArch64::AEK_CRC,         AArch64::AEK_FP,
+                 AArch64::AEK_SIMD,        AArch64::AEK_RAS,
+                 AArch64::AEK_LSE,         AArch64::AEK_RDM,
+                 AArch64::AEK_RCPC,        AArch64::AEK_DOTPROD,
+                 AArch64::AEK_MTE,         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_FLAGM,
+                 AArch64::AEK_JSCVT,       AArch64::AEK_FCMA})),
             "9-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-x3", "armv9-a", "neon-fp-armv8",
@@ -1353,45 +1374,49 @@ INSTANTIATE_TEST_SUITE_P(
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cortex-x4", "armv9.2-a", "crypto-neon-fp-armv8",
             (AArch64::ExtensionBitset(
-                {AArch64::AEK_BF16,  AArch64::AEK_I8MM,  AArch64::AEK_SVE,
-                 AArch64::AEK_SVE2,  AArch64::AEK_FP16,  AArch64::AEK_DOTPROD,
-                 AArch64::AEK_LSE,  AArch64::AEK_RDM,  AArch64::AEK_SIMD,
-                 AArch64::AEK_RCPC,  AArch64::AEK_RAS,  AArch64::AEK_CRC,
-                 AArch64::AEK_FP,  AArch64::AEK_SB,  AArch64::AEK_SSBS,
-                 AArch64::AEK_MTE,  AArch64::AEK_FP16FML,  AArch64::AEK_PAUTH,
-                 AArch64::AEK_SVE2BITPERM,  AArch64::AEK_FLAGM,
-                 AArch64::AEK_PERFMON, AArch64::AEK_PREDRES,
-                 AArch64::AEK_PROFILE, AArch64::AEK_JSCVT, AArch64::AEK_FCMA})),
+                {AArch64::AEK_BF16,        AArch64::AEK_I8MM,
+                 AArch64::AEK_SVE,         AArch64::AEK_SVE2,
+                 AArch64::AEK_FP16,        AArch64::AEK_DOTPROD,
+                 AArch64::AEK_LSE,         AArch64::AEK_RDM,
+                 AArch64::AEK_SIMD,        AArch64::AEK_RCPC,
+                 AArch64::AEK_RAS,         AArch64::AEK_CRC,
+                 AArch64::AEK_FP,          AArch64::AEK_SB,
+                 AArch64::AEK_SSBS,        AArch64::AEK_MTE,
+                 AArch64::AEK_FP16FML,     AArch64::AEK_PAUTH,
+                 AArch64::AEK_SVE2BITPERM, AArch64::AEK_FLAGM,
+                 AArch64::AEK_PERFMON,     AArch64::AEK_PREDRES,
+                 AArch64::AEK_PROFILE,     AArch64::AEK_JSCVT,
+                 AArch64::AEK_FCMA})),
             "9.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "cyclone", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_NONE, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_NONE, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "apple-a7", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_NONE, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_NONE, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "apple-a8", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_NONE, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_NONE, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "apple-a9", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_NONE, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_NONE, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "apple-a10", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_RDM, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_RDM, AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "apple-a11", "armv8.2-a", "crypto-neon-fp-armv8",
@@ -1514,54 +1539,55 @@ INSTANTIATE_TEST_SUITE_P(
             "8.3-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "exynos-m3", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "exynos-m4", "armv8.2-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_DOTPROD, AArch64::AEK_FP, AArch64::AEK_FP16,
-                 AArch64::AEK_LSE, AArch64::AEK_RAS, AArch64::AEK_RDM,
-                 AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_DOTPROD,
+                                       AArch64::AEK_FP, AArch64::AEK_FP16,
+                                       AArch64::AEK_LSE, AArch64::AEK_RAS,
+                                       AArch64::AEK_RDM, AArch64::AEK_SIMD})),
             "8.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "exynos-m5", "armv8.2-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_DOTPROD, AArch64::AEK_FP, AArch64::AEK_FP16,
-                 AArch64::AEK_LSE, AArch64::AEK_RAS, AArch64::AEK_RDM,
-                 AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_DOTPROD,
+                                       AArch64::AEK_FP, AArch64::AEK_FP16,
+                                       AArch64::AEK_LSE, AArch64::AEK_RAS,
+                                       AArch64::AEK_RDM, AArch64::AEK_SIMD})),
             "8.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "falkor", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD, AArch64::AEK_RDM})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD, AArch64::AEK_RDM})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "kryo", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "neoverse-e1", "armv8.2-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_DOTPROD, AArch64::AEK_FP, AArch64::AEK_FP16,
-                 AArch64::AEK_LSE, AArch64::AEK_RAS, AArch64::AEK_RCPC,
-                 AArch64::AEK_RDM, AArch64::AEK_SIMD, AArch64::AEK_SSBS})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_DOTPROD,
+                                       AArch64::AEK_FP, AArch64::AEK_FP16,
+                                       AArch64::AEK_LSE, AArch64::AEK_RAS,
+                                       AArch64::AEK_RCPC, AArch64::AEK_RDM,
+                                       AArch64::AEK_SIMD, AArch64::AEK_SSBS})),
             "8.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "neoverse-n1", "armv8.2-a", "crypto-neon-fp-armv8",
             (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_DOTPROD, AArch64::AEK_FP, AArch64::AEK_FP16,
-                 AArch64::AEK_LSE, AArch64::AEK_PROFILE, AArch64::AEK_RAS,
-                 AArch64::AEK_RCPC, AArch64::AEK_RDM, AArch64::AEK_SIMD,
-                 AArch64::AEK_SSBS})),
+                {AArch64::AEK_CRC, AArch64::AEK_AES,
+                 AArch64::AEK_SHA2, AArch64::AEK_DOTPROD, AArch64::AEK_FP,
+                 AArch64::AEK_FP16, AArch64::AEK_LSE, AArch64::AEK_PROFILE,
+                 AArch64::AEK_RAS, AArch64::AEK_RCPC, AArch64::AEK_RDM,
+                 AArch64::AEK_SIMD, AArch64::AEK_SSBS})),
             "8.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "neoverse-n2", "armv9-a", "crypto-neon-fp-armv8",
@@ -1580,24 +1606,24 @@ INSTANTIATE_TEST_SUITE_P(
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "ampere1", "armv8.6-a", "crypto-neon-fp-armv8",
             (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_FP, AArch64::AEK_FP16,
-                 AArch64::AEK_SIMD, AArch64::AEK_RAS, AArch64::AEK_LSE,
-                 AArch64::AEK_RDM, AArch64::AEK_RCPC, AArch64::AEK_DOTPROD,
+                {AArch64::AEK_CRC,  AArch64::AEK_FP,   AArch64::AEK_FP16,
+                 AArch64::AEK_SIMD, AArch64::AEK_RAS,  AArch64::AEK_LSE,
+                 AArch64::AEK_RDM,  AArch64::AEK_RCPC, AArch64::AEK_DOTPROD,
                  AArch64::AEK_SHA3, AArch64::AEK_BF16, AArch64::AEK_SHA2,
-                 AArch64::AEK_AES, AArch64::AEK_I8MM, AArch64::AEK_SSBS,
-                 AArch64::AEK_SB, AArch64::AEK_RAND, AArch64::AEK_JSCVT,
+                 AArch64::AEK_AES,  AArch64::AEK_I8MM, AArch64::AEK_SSBS,
+                 AArch64::AEK_SB,   AArch64::AEK_RAND, AArch64::AEK_JSCVT,
                  AArch64::AEK_FCMA, AArch64::AEK_PAUTH})),
             "8.6-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "ampere1a", "armv8.6-a", "crypto-neon-fp-armv8",
             (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_FP, AArch64::AEK_FP16,
-                 AArch64::AEK_SIMD, AArch64::AEK_RAS, AArch64::AEK_LSE,
-                 AArch64::AEK_RDM, AArch64::AEK_RCPC, AArch64::AEK_DOTPROD,
-                 AArch64::AEK_SM4, AArch64::AEK_SHA3, AArch64::AEK_BF16,
-                 AArch64::AEK_SHA2, AArch64::AEK_AES, AArch64::AEK_I8MM,
-                 AArch64::AEK_SSBS, AArch64::AEK_SB, AArch64::AEK_RAND,
-                 AArch64::AEK_MTE, AArch64::AEK_JSCVT, AArch64::AEK_FCMA,
+                {AArch64::AEK_CRC,  AArch64::AEK_FP,    AArch64::AEK_FP16,
+                 AArch64::AEK_SIMD, AArch64::AEK_RAS,   AArch64::AEK_LSE,
+                 AArch64::AEK_RDM,  AArch64::AEK_RCPC,  AArch64::AEK_DOTPROD,
+                 AArch64::AEK_SM4,  AArch64::AEK_SHA3,  AArch64::AEK_BF16,
+                 AArch64::AEK_SHA2, AArch64::AEK_AES,   AArch64::AEK_I8MM,
+                 AArch64::AEK_SSBS, AArch64::AEK_SB,    AArch64::AEK_RAND,
+                 AArch64::AEK_MTE,  AArch64::AEK_JSCVT, AArch64::AEK_FCMA,
                  AArch64::AEK_PAUTH})),
             "8.6-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
@@ -1627,10 +1653,10 @@ INSTANTIATE_TEST_SUITE_P(
             "8.4-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "thunderx2t99", "armv8.1-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_LSE, AArch64::AEK_RDM, AArch64::AEK_FP,
-                 AArch64::AEK_SIMD})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_LSE,
+                                       AArch64::AEK_RDM, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD})),
             "8.1-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "thunderx3t110", "armv8.3-a", "crypto-neon-fp-armv8",
@@ -1642,27 +1668,27 @@ INSTANTIATE_TEST_SUITE_P(
             "8.3-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "thunderx", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_SIMD, AArch64::AEK_FP})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_SIMD,
+                                       AArch64::AEK_FP})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "thunderxt81", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_SIMD, AArch64::AEK_FP})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_SIMD,
+                                       AArch64::AEK_FP})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "thunderxt83", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_SIMD, AArch64::AEK_FP})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_SIMD,
+                                       AArch64::AEK_FP})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "thunderxt88", "armv8-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_SIMD, AArch64::AEK_FP})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_SIMD,
+                                       AArch64::AEK_FP})),
             "8-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "tsv110", "armv8.2-a", "crypto-neon-fp-armv8",
@@ -1675,11 +1701,11 @@ INSTANTIATE_TEST_SUITE_P(
             "8.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "a64fx", "armv8.2-a", "crypto-neon-fp-armv8",
-            (AArch64::ExtensionBitset(
-                {AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
-                 AArch64::AEK_FP, AArch64::AEK_SIMD, AArch64::AEK_FP16,
-                 AArch64::AEK_RAS, AArch64::AEK_LSE, AArch64::AEK_SVE,
-                 AArch64::AEK_RDM})),
+            (AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_AES,
+                                       AArch64::AEK_SHA2, AArch64::AEK_FP,
+                                       AArch64::AEK_SIMD, AArch64::AEK_FP16,
+                                       AArch64::AEK_RAS, AArch64::AEK_LSE,
+                                       AArch64::AEK_SVE, AArch64::AEK_RDM})),
             "8.2-A"),
         ARMCPUTestParams<AArch64::ExtensionBitset>(
             "carmel", "armv8.2-a", "crypto-neon-fp-armv8",

@ptomsich
Copy link
Contributor Author

ptomsich commented Feb 9, 2024

The clang-format failures are caused by preexisting/unchanged code.
All newly added code passes clang-format.

@jthackray jthackray self-requested a review February 9, 2024 22:02
@jthackray
Copy link
Contributor

The clang-format failures are caused by preexisting/unchanged code. All newly added code passes clang-format.

Yes, I had this issue when I landed new cores previously. This whole file needs an NFC clang-format cleanup, IMHO.

The Ampere1B is Ampere's third-generation core implementing a
superscalar, out-of-order microarchitecture with nested
virtualization, speculative side-channel mitigation and architectural
support for defense against ROP/JOP style software attacks.

Ampere1B is an ARMv8.7+ implementation, adding support for the FEAT
WFxT, FEAT CSSC, FEAT PAN3 and FEAT AFP extensions.  It also includes
all features of the second-generation Ampere1A, such as the Memory
Tagging Extension and SM3/SM4 cryptography instructions.

Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
@ptomsich ptomsich force-pushed the ptomsich/main/pull-requests/ampere-1b/core branch from f5ed6d9 to 257576a Compare February 9, 2024 23:02
Copy link
Contributor

@jthackray jthackray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ptomsich ptomsich merged commit fbba818 into llvm:main Feb 9, 2024
2 of 4 checks passed
@ptomsich ptomsich deleted the ptomsich/main/pull-requests/ampere-1b/core branch February 9, 2024 23:22
llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Feb 15, 2024
The Ampere1B is Ampere's third-generation core implementing a
superscalar, out-of-order microarchitecture with nested virtualization,
speculative side-channel mitigation and architectural support for
defense against ROP/JOP style software attacks.

Ampere1B is an ARMv8.7+ implementation, adding support for the FEAT
WFxT, FEAT CSSC, FEAT PAN3 and FEAT AFP extensions. It also includes all
features of the second-generation Ampere1A, such as the Memory Tagging
Extension and SM3/SM4 cryptography instructions.

(cherry picked from commit fbba818)
llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Feb 27, 2024
The Ampere1B is Ampere's third-generation core implementing a
superscalar, out-of-order microarchitecture with nested virtualization,
speculative side-channel mitigation and architectural support for
defense against ROP/JOP style software attacks.

Ampere1B is an ARMv8.7+ implementation, adding support for the FEAT
WFxT, FEAT CSSC, FEAT PAN3 and FEAT AFP extensions. It also includes all
features of the second-generation Ampere1A, such as the Memory Tagging
Extension and SM3/SM4 cryptography instructions.

(cherry picked from commit fbba818)
@pointhex pointhex mentioned this pull request May 7, 2024
xgupta pushed a commit to xgupta/llvm-project that referenced this pull request Aug 23, 2024
The Ampere1B is Ampere's third-generation core implementing a
superscalar, out-of-order microarchitecture with nested virtualization,
speculative side-channel mitigation and architectural support for
defense against ROP/JOP style software attacks.

Ampere1B is an ARMv8.7+ implementation, adding support for the FEAT
WFxT, FEAT CSSC, FEAT PAN3 and FEAT AFP extensions. It also includes all
features of the second-generation Ampere1A, such as the Memory Tagging
Extension and SM3/SM4 cryptography instructions.

(cherry picked from commit fbba818)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AArch64 clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category mc Machine (object) code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants