[PATCH] x86: Add -march=cascadelake
Wei Xiao
wei.william.xiao@gmail.com
Sun Dec 16 15:15:00 GMT 2018
Thanks for the comments!
Fixed as attached.
Ok for trunk?
Jakub Jelinek <jakub@redhat.com> 于2018年12月14日周五 下午6:47写道:
>
> On Fri, Dec 14, 2018 at 06:33:37PM +0800, Wei Xiao wrote:
> --- a/gcc/config/i386/driver-i386.c
> +++ b/gcc/config/i386/driver-i386.c
> @@ -832,8 +832,16 @@ const char *host_detect_local_cpu (int argc, const char **argv)
> cpu = "skylake";
> break;
> case 0x55:
> - /* Skylake with AVX-512. */
> - cpu = "skylake-avx512";
> + if (has_avx512vnni)
> + {
> + /* Cascade Lake. */
> + cpu = "cascadelake";
> + }
> + else
> + {
> + /* Skylake with AVX-512. */
> + cpu = "skylake-avx512";
> + }
> break;
>
> Just a formatting nit here, if {}s are used, they should be indented
> 2 columns to the right from the if or else and the body of {} should
> be indented by two further columns over {.
> But, in this case, there is another rule, that if the body has a single
> statement, then there shouldn't be {}s around it. Thus just:
> if (has_avx512vnni)
> /* Cascade Lake. */
> cpu = "cascadelake";
> else
> /* Skylake with AVX-512. */
> cpu = "skylake-avx512";
>
> Jakub
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cascadelake-v6.diff
Type: application/octet-stream
Size: 6105 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181216/2bc9c449/attachment.obj>
More information about the Gcc-patches
mailing list