]> granicus.if.org Git - llvm/commitdiff
Merging r326840:
authorTom Stellard <tstellar@redhat.com>
Sat, 7 Apr 2018 00:58:44 +0000 (00:58 +0000)
committerTom Stellard <tstellar@redhat.com>
Sat, 7 Apr 2018 00:58:44 +0000 (00:58 +0000)
------------------------------------------------------------------------
r326840 | ctopper | 2018-03-06 14:45:31 -0800 (Tue, 06 Mar 2018) | 5 lines

[X86] Fix a typo in Host.cpp that causes us to misidentify KNL, Silvermont, Goldmont and probably other CPUs for -march=native

I think most of the Intel Core CPUs and recent AMD CPUs are unaffected. All the CPUs that have a "subtype" should work. The ones that were broken are the ones that are a "type" with no subtypes.

Fixes PR36619.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329473 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Host.cpp

index 3dc67ad782af54f3655830d3effc95f19abbf065..6e65b5e6c80759d993cb7c10be977cbab35e8687 100644 (file)
@@ -1009,7 +1009,7 @@ StringRef sys::getHostCPUName() {
 #include "llvm/Support/X86TargetParser.def"
 
   // Now check types.
-#define X86_CPU_SUBTYPE(ARCHNAME, ENUM) \
+#define X86_CPU_TYPE(ARCHNAME, ENUM) \
   if (Type == X86::ENUM) \
     return ARCHNAME;
 #include "llvm/Support/X86TargetParser.def"