On Wed, Nov 21, 2018 at 06:23:41PM +0800, Wei Xiao wrote: > The attached patch added -march=cascadelake for x86. > Tested with bootstrap and regression tests on x86_64. No regressions. > Is it ok for trunk?
Not a real review, just nits: index bff4dfb..f7c1c98 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2018-11-21 Wei Xiao <wei3.x...@intel.com> Two spaces after date, two spaces before <. --- a/gcc/config/i386/driver-i386.c +++ b/gcc/config/i386/driver-i386.c @@ -857,6 +857,9 @@ const char *host_detect_local_cpu (int argc, const char **argv) /* Assume Ice Lake. */ else if (has_gfni) cpu = "icelake-client"; + /* Assume Cascade Lake. */ + if (has_avx512vnni) + cpu = "cascadelake"; /* Assume Cannon Lake. */ else if (has_avx512vbmi) cpu = "cannonlake"; Doesn't this break handling of all the other CPUs? I mean, it is a large if (cond) ... else if (cond) ... else if (cond) ... else ... but you've added if without else before it into the middle. Jakub