Re: [PATCH] i386: Fix emissing of __builtin_cpu_supports.

2021-12-14 Thread Jakub Jelinek via Gcc-patches
rtin > From 227450e9f3a506fdfcff67aa45135fe31f3f91f6 Mon Sep 17 00:00:00 2001 > From: Martin Liska > Date: Mon, 13 Dec 2021 15:34:30 +0100 > Subject: [PATCH] i386: Fix emissing of __builtin_cpu_supports. > > PR target/103661 > > gcc/ChangeLog: > > * c

Re: [PATCH] i386: Fix emissing of __builtin_cpu_supports.

2021-12-14 Thread Martin Liška
ct: [PATCH] i386: Fix emissing of __builtin_cpu_supports. PR target/103661 gcc/ChangeLog: * config/i386/i386-builtins.c (fold_builtin_cpu): Compare to 0 as API expects that non-zero values are returned (do that it mask == 31). For "avx512vbmi2" argument, we return now 1 << 31, wh

Re: [PATCH] i386: Fix emissing of __builtin_cpu_supports.

2021-12-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Dec 14, 2021 at 10:55:01AM +0100, Martin Liška wrote: > The patch fixes __builtin_cpu_supports("avx512vbmi2") which returns a negative > value (that's not allowed in the documentation). > > I also checked ppc target that does the same, and __builtin_cpu_is, which > are fine. > > Patch can

[PATCH] i386: Fix emissing of __builtin_cpu_supports.

2021-12-14 Thread Martin Liška
The patch fixes __builtin_cpu_supports("avx512vbmi2") which returns a negative value (that's not allowed in the documentation). I also checked ppc target that does the same, and __builtin_cpu_is, which are fine. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be