[llvm] [AArch64] Add missing tests for Arm cpus (PR #106749)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 08:35:04 PDT 2024


https://github.com/FLZ101 created https://github.com/llvm/llvm-project/pull/106749

None

>From 7d590749f136ef85d9dbb37c9ddc4182bb750e93 Mon Sep 17 00:00:00 2001
From: fengleizZZ <fenglei4518 at hotmail.com>
Date: Fri, 30 Aug 2024 23:32:57 +0800
Subject: [PATCH] [AArch64] Add missing tests for Arm cpus

---
 llvm/unittests/TargetParser/Host.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/llvm/unittests/TargetParser/Host.cpp b/llvm/unittests/TargetParser/Host.cpp
index f8dd1d3a60a005..5e2edcef09bf8c 100644
--- a/llvm/unittests/TargetParser/Host.cpp
+++ b/llvm/unittests/TargetParser/Host.cpp
@@ -82,9 +82,21 @@ TEST(getLinuxHostCPUName, AArch64) {
   EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x41\n"
                                               "CPU part        : 0xd40"),
             "neoverse-v1");
+  EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x41\n"
+                                              "CPU part        : 0xd4f"),
+            "neoverse-v2");
+  EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x41\n"
+                                              "CPU part        : 0xd84"),
+            "neoverse-v3");
   EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x41\n"
                                               "CPU part        : 0xd0c"),
             "neoverse-n1");
+  EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x41\n"
+                                              "CPU part        : 0xd49"),
+            "neoverse-n2");
+  EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x41\n"
+                                              "CPU part        : 0xd8e"),
+            "neoverse-n3");
   // Verify that both CPU implementer and CPU part are checked:
   EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x40\n"
                                               "CPU part        : 0xd03"),



More information about the llvm-commits mailing list