From 93c1975ddeac4fcd12bf234dd82ce7ecdae81dd5 Mon Sep 17 00:00:00 2001 From: Balaram Makam Date: Fri, 22 Sep 2017 17:46:36 +0000 Subject: [PATCH] [Falkor] Add falkor CPU to host detection This returns "falkor" for Falkor CPU. llvm-svn: 313998 --- lib/Support/Host.cpp | 1 + unittests/Support/Host.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/Support/Host.cpp b/lib/Support/Host.cpp index ab97592d5a0..e315e9141e2 100644 --- a/lib/Support/Host.cpp +++ b/lib/Support/Host.cpp @@ -211,6 +211,7 @@ StringRef sys::detail::getHostCPUNameForARM( .Case("0x211", "kryo") .Case("0x800", "cortex-a73") .Case("0x801", "cortex-a73") + .Case("0xc00", "falkor") .Default("generic"); return "generic"; diff --git a/unittests/Support/Host.cpp b/unittests/Support/Host.cpp index 3dabe972350..2486d5fb395 100644 --- a/unittests/Support/Host.cpp +++ b/unittests/Support/Host.cpp @@ -111,6 +111,9 @@ TEST(getLinuxHostCPUName, AArch64) { EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x51\n" "CPU part : 0x801"), "cortex-a73"); + EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x51\n" + "CPU part : 0xc00"), + "falkor"); // MSM8992/4 weirdness StringRef MSM8992ProcCpuInfo = R"(