[PATCH] D80736: [AArch64] Add native CPU detection for Neoverse N1
James Greenhalgh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 28 09:50:30 PDT 2020
jgreenhalgh created this revision.
jgreenhalgh added reviewers: t.p.northover, SjoerdMeijer, eli.friedman.
Herald added subscribers: llvm-commits, danielkiss, hiraditya, kristof.beyls.
Herald added a project: LLVM.
Hi,
As subject line, map the ID value 0xd0c to "neoverse-n1". This reflects the value used by the GCC support https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/config/aarch64/aarch64-cores.def;h=b0c7d2f23ace1e3c3a89f4e3ab10c9ad08f56b22;hp=7c4bd52049e5ae33241acce37414da91abaa989c;hb=9ed6834deacecd0e0671793e1440aa728939b93f;hpb=229d576cde53ac4396583da3642ca969cca413d1
I've got no commit access over here, so would appreciate this being committed on my behalf if it is OK.
Thanks,
James
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80736
Files:
llvm/lib/Support/Host.cpp
llvm/unittests/Support/Host.cpp
Index: llvm/unittests/Support/Host.cpp
===================================================================
--- llvm/unittests/Support/Host.cpp
+++ llvm/unittests/Support/Host.cpp
@@ -100,6 +100,10 @@
EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x41\n"
"CPU part : 0xd03"),
"cortex-a53");
+
+ EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x41\n"
+ "CPU part : 0xd0c"),
+ "neoverse-n1");
// Verify that both CPU implementer and CPU part are checked:
EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x40\n"
"CPU part : 0xd03"),
Index: llvm/lib/Support/Host.cpp
===================================================================
--- llvm/lib/Support/Host.cpp
+++ llvm/lib/Support/Host.cpp
@@ -204,6 +204,7 @@
.Case("0xd09", "cortex-a73")
.Case("0xd0a", "cortex-a75")
.Case("0xd0b", "cortex-a76")
+ .Case("0xd0c", "neoverse-n1")
.Default("generic");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80736.266920.patch
Type: text/x-patch
Size: 1162 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200528/7c8e842c/attachment.bin>
More information about the llvm-commits
mailing list