[PATCH] D109517: [Clang][ARM][AArch64] Add support for Armv9-A, Armv9.1-A and Armv9.2-A

Victor Campos via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 14 06:44:18 PDT 2021


vhscampos added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:413
 
-  auto V8_6Pos = llvm::find(Features, "+v8.6a");
-  if (V8_6Pos != std::end(Features))
-    V8_6Pos = Features.insert(std::next(V8_6Pos), {"+i8mm", "+bf16"});
+  const char *Archs[] = {"+v8.6a", "+v8.7a", "+v9.1a", "+v9.2a"};
+  auto Pos = std::find_first_of(Features.begin(), Features.end(),
----------------
SjoerdMeijer wrote:
> How about `+v9a`?
Since v9a maps to v8.5a, and the latter was skipped in the original code, I did not include v9a here.


================
Comment at: llvm/unittests/Support/TargetParserTest.cpp:495
                           ARMBuildAttrs::CPUArch::v8_A));
+  EXPECT_TRUE(
+      testARMArch("armv9-a", "generic", "v9a",
----------------
SjoerdMeijer wrote:
> I haven't looked, but in these target parser tests, do we also not need to check the architecture descriptions?
> Copied this for example from the target parser def file:
> 
>          (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
>           ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
>           ARM::AEK_DOTPROD)
If I understand it correctly, we only check architecture extensions for CPUs, not for the architectures themselves.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109517/new/

https://reviews.llvm.org/D109517



More information about the cfe-commits mailing list