[llvm] [clang] [AArch64] Introduce the Armv9.5-A architecture version (PR #72392)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 15 06:17:27 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff b7b6d54004ef8a89dc3bad411f11a1ef93319a13 98ac417eff3ba114cc56241635917190930df266 -- clang/test/Driver/aarch64-v95a.c clang/lib/Basic/Targets/AArch64.cpp clang/lib/Basic/Targets/AArch64.h clang/lib/Driver/ToolChains/Arch/AArch64.cpp clang/test/Preprocessor/aarch64-target-features.c llvm/include/llvm/TargetParser/AArch64TargetParser.h llvm/include/llvm/TargetParser/Triple.h llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp llvm/lib/TargetParser/ARMTargetParserCommon.cpp llvm/unittests/TargetParser/TargetParserTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Driver/ToolChains/Arch/AArch64.cpp b/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
index 1f77c98705..6f9c396ee3 100644
--- a/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
+++ b/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
@@ -411,7 +411,8 @@ void aarch64::getAArch64TargetFeatures(const Driver &D,
else if (*I == "+v9.2a") V9Version = 2;
else if (*I == "+v9.3a") V9Version = 3;
else if (*I == "+v9.4a") V9Version = 4;
- else if (*I == "+v9.5a") V9Version = 5;
+ else if (*I == "+v9.5a")
+ V9Version = 5;
else if (*I == "+sm4") HasSM4 = true;
else if (*I == "+sha3") HasSHA3 = true;
else if (*I == "+sha2") HasSHA2 = true;
diff --git a/llvm/include/llvm/TargetParser/AArch64TargetParser.h b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
index 0a0bcc2994..4505f6e8c5 100644
--- a/llvm/include/llvm/TargetParser/AArch64TargetParser.h
+++ b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
@@ -386,7 +386,7 @@ inline constexpr ArchInfo ARMV8R = { VersionTuple{8, 0}, RProfile, "armv8-r",
// The set of all architectures
static constexpr std::array<const ArchInfo *, 17> ArchInfos = {
&ARMV8A, &ARMV8_1A, &ARMV8_2A, &ARMV8_3A, &ARMV8_4A, &ARMV8_5A,
- &ARMV8_6A, &ARMV8_7A, &ARMV8_8A, &ARMV8_9A, &ARMV9A, &ARMV9_1A,
+ &ARMV8_6A, &ARMV8_7A, &ARMV8_8A, &ARMV8_9A, &ARMV9A, &ARMV9_1A,
&ARMV9_2A, &ARMV9_3A, &ARMV9_4A, &ARMV9_5A, &ARMV8R,
};
diff --git a/llvm/unittests/TargetParser/TargetParserTest.cpp b/llvm/unittests/TargetParser/TargetParserTest.cpp
index 75d2a43912..68cb482304 100644
--- a/llvm/unittests/TargetParser/TargetParserTest.cpp
+++ b/llvm/unittests/TargetParser/TargetParserTest.cpp
@@ -1887,9 +1887,9 @@ TEST(TargetParserTest, AArch64ArchPartialOrder) {
})
EXPECT_TRUE(A->implies(AArch64::ARMV8A));
- for (const auto *A : {&AArch64::ARMV9_1A, &AArch64::ARMV9_2A,
- &AArch64::ARMV9_3A, &AArch64::ARMV9_4A,
- &AArch64::ARMV9_5A})
+ for (const auto *A :
+ {&AArch64::ARMV9_1A, &AArch64::ARMV9_2A, &AArch64::ARMV9_3A,
+ &AArch64::ARMV9_4A, &AArch64::ARMV9_5A})
EXPECT_TRUE(A->implies(AArch64::ARMV9A));
EXPECT_TRUE(AArch64::ARMV8_1A.implies(AArch64::ARMV8A));
``````````
</details>
https://github.com/llvm/llvm-project/pull/72392
More information about the cfe-commits
mailing list