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

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 6 14:48:37 PST 2018


On Tue, Mar 6, 2018 at 5:45 PM, Craig Topper via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: ctopper
> Date: Tue Mar  6 14:45:31 2018
> New Revision: 326840
>
> URL: http://llvm.org/viewvc/llvm-project?rev=326840&view=rev
> Log:
> [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.

Are there tests that can be added for this commit?

~Aaron

>
> Fixes PR36619.
>
> Modified:
>     llvm/trunk/lib/Support/Host.cpp
>
> Modified: llvm/trunk/lib/Support/Host.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Host.cpp?rev=326840&r1=326839&r2=326840&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Support/Host.cpp (original)
> +++ llvm/trunk/lib/Support/Host.cpp Tue Mar  6 14:45:31 2018
> @@ -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"
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list