diff mbox

Enable Intel AVX512_4FMAPS and AVX512_4VNNIW instructions

Message ID 20161119080505.GO3541@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Nov. 19, 2016, 8:05 a.m. UTC
On Fri, Nov 18, 2016 at 09:30:06PM +0100, Jakub Jelinek wrote:
> On Fri, Nov 18, 2016 at 08:41:01PM +0100, Jakub Jelinek wrote:
> > I'm seeing lots of ICEs with this.
> 
> Here is untested fix for that, will bootstrap/regtest it soon (after my
> current set of bootstraps finishes).
> 
> 2016-11-18  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* config/i386/i386.c (ix86_expand_builtin): Remove msk_mov variable,
> 	don't initialize it, don't use it for the case where it isn't
> 	provable %{z} nor using the same argument, instead move merge
> 	argument into a new pseudo and use that as target.  Formatting fixes.

Now successfully bootstrapped/regtested on x86_64-linux and i686-linux and
fixed a couple of FAILs, but not tons of others.

Here is another patch I'm going to test which fixes many other FAILs, but
still some are left:
FAIL: gcc.target/i386/funcspec-3.c (internal compiler error)
FAIL: gcc.target/i386/funcspec-3.c (test for excess errors)
FAIL: gcc.target/i386/mvc1.c (internal compiler error)
FAIL: gcc.target/i386/mvc1.c (test for excess errors)
FAIL: gcc.target/i386/mvc6.c (internal compiler error)
FAIL: gcc.target/i386/mvc6.c (test for excess errors)
FAIL: gcc.target/i386/mvc6.c scan-assembler vpshufb
FAIL: gcc.target/i386/mvc6.c scan-assembler punpcklbw
FAIL: gcc.target/i386/mvc8.c (internal compiler error)
FAIL: gcc.target/i386/mvc8.c (test for excess errors)
FAIL: gcc.target/i386/pr67995-2.c (internal compiler error)
FAIL: gcc.target/i386/pr67995-2.c (test for excess errors)
FAIL: gcc.target/i386/pr71652-3.c (internal compiler error)
FAIL: gcc.target/i386/pr71652-3.c  (test for errors, line 5)
FAIL: gcc.target/i386/pr71652-3.c (test for excess errors)
Will debug even those.

2016-11-19  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/i386.c (def_builtin, def_builtin2, def_builtin_const2,
	ix86_add_new_builtins): Formatting fixes.
	(ix86_expand_builtin): Use || instead of && for isa vs. isa2.
	(ix86_get_builtin): Likewise.



	Jakub

Comments

Uros Bizjak Nov. 19, 2016, 10:17 a.m. UTC | #1
On Sat, Nov 19, 2016 at 9:05 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Nov 18, 2016 at 09:30:06PM +0100, Jakub Jelinek wrote:
>> On Fri, Nov 18, 2016 at 08:41:01PM +0100, Jakub Jelinek wrote:
>> > I'm seeing lots of ICEs with this.
>>
>> Here is untested fix for that, will bootstrap/regtest it soon (after my
>> current set of bootstraps finishes).
>>
>> 2016-11-18  Jakub Jelinek  <jakub@redhat.com>
>>
>>       * config/i386/i386.c (ix86_expand_builtin): Remove msk_mov variable,
>>       don't initialize it, don't use it for the case where it isn't
>>       provable %{z} nor using the same argument, instead move merge
>>       argument into a new pseudo and use that as target.  Formatting fixes.
>
> Now successfully bootstrapped/regtested on x86_64-linux and i686-linux and
> fixed a couple of FAILs, but not tons of others.
>
> Here is another patch I'm going to test which fixes many other FAILs, but
> still some are left:
> FAIL: gcc.target/i386/funcspec-3.c (internal compiler error)
> FAIL: gcc.target/i386/funcspec-3.c (test for excess errors)
> FAIL: gcc.target/i386/mvc1.c (internal compiler error)
> FAIL: gcc.target/i386/mvc1.c (test for excess errors)
> FAIL: gcc.target/i386/mvc6.c (internal compiler error)
> FAIL: gcc.target/i386/mvc6.c (test for excess errors)
> FAIL: gcc.target/i386/mvc6.c scan-assembler vpshufb
> FAIL: gcc.target/i386/mvc6.c scan-assembler punpcklbw
> FAIL: gcc.target/i386/mvc8.c (internal compiler error)
> FAIL: gcc.target/i386/mvc8.c (test for excess errors)
> FAIL: gcc.target/i386/pr67995-2.c (internal compiler error)
> FAIL: gcc.target/i386/pr67995-2.c (test for excess errors)
> FAIL: gcc.target/i386/pr71652-3.c (internal compiler error)
> FAIL: gcc.target/i386/pr71652-3.c  (test for errors, line 5)
> FAIL: gcc.target/i386/pr71652-3.c (test for excess errors)

I wonder why patch submitter didn't get these failures during
regtesting. There are plenty of tests (the above multi-vrsioning
tests) that depend on correct handling of ISA variables. I assumed
that these tests passed and consequently didn't went deep into the
implementation, but rather requested a couple of additional tests that
exercised added functionality.some more.

> Will debug even those.

Thanks!

Uros.

> 2016-11-19  Jakub Jelinek  <jakub@redhat.com>
>
>         * config/i386/i386.c (def_builtin, def_builtin2, def_builtin_const2,
>         ix86_add_new_builtins): Formatting fixes.
>         (ix86_expand_builtin): Use || instead of && for isa vs. isa2.
>         (ix86_get_builtin): Likewise.
>
> --- gcc/config/i386/i386.c.jj   2016-11-18 22:30:16.000000000 +0100
> +++ gcc/config/i386/i386.c      2016-11-19 08:37:45.748175866 +0100
> @@ -30924,7 +30924,7 @@ def_builtin (HOST_WIDE_INT mask, const c
>          means that *both* cpuid bits must be set for the built-in to be available.
>          Handle this here.  */
>        if (mask & ix86_isa_flags & OPTION_MASK_ISA_AVX512VL)
> -         mask &= ~OPTION_MASK_ISA_AVX512VL;
> +       mask &= ~OPTION_MASK_ISA_AVX512VL;
>
>        mask &= ~OPTION_MASK_ISA_64BIT;
>        if (mask == 0
> @@ -30976,8 +30976,8 @@ def_builtin_const (HOST_WIDE_INT mask, c
>
>  static inline tree
>  def_builtin2 (HOST_WIDE_INT mask, const char *name,
> -            enum ix86_builtin_func_type tcode,
> -            enum ix86_builtins code)
> +             enum ix86_builtin_func_type tcode,
> +             enum ix86_builtins code)
>  {
>    tree decl = NULL_TREE;
>
> @@ -30992,8 +30992,8 @@ def_builtin2 (HOST_WIDE_INT mask, const
>        tree type = ix86_get_builtin_func_type (tcode);
>        decl = add_builtin_function (name, type, code, BUILT_IN_MD,
>                                    NULL, NULL_TREE);
> -         ix86_builtins[(int) code] = decl;
> -         ix86_builtins_isa[(int) code].set_and_not_built_p = false;
> +      ix86_builtins[(int) code] = decl;
> +      ix86_builtins_isa[(int) code].set_and_not_built_p = false;
>      }
>    else
>      {
> @@ -31016,7 +31016,7 @@ def_builtin2 (HOST_WIDE_INT mask, const
>
>  static inline tree
>  def_builtin_const2 (HOST_WIDE_INT mask, const char *name,
> -                  enum ix86_builtin_func_type tcode, enum ix86_builtins code)
> +                   enum ix86_builtin_func_type tcode, enum ix86_builtins code)
>  {
>    tree decl = def_builtin2 (mask, name, tcode, code);
>    if (decl)
> @@ -31034,8 +31034,8 @@ def_builtin_const2 (HOST_WIDE_INT mask,
>  static void
>  ix86_add_new_builtins (HOST_WIDE_INT isa, HOST_WIDE_INT isa2)
>  {
> -  if (((isa & deferred_isa_values) == 0)
> -      && ((isa2 & deferred_isa_values2) == 0))
> +  if ((isa & deferred_isa_values) == 0
> +      && (isa2 & deferred_isa_values2) == 0)
>      return;
>
>    /* Bits in ISA value can be removed from potential isa values.  */
> @@ -31048,7 +31048,8 @@ ix86_add_new_builtins (HOST_WIDE_INT isa
>
>    for (i = 0; i < (int)IX86_BUILTIN_MAX; i++)
>      {
> -      if ((((ix86_builtins_isa[i].isa & isa) != 0) || ((ix86_builtins_isa[i].isa2 & isa2) != 0))
> +      if (((ix86_builtins_isa[i].isa & isa) != 0
> +          || (ix86_builtins_isa[i].isa2 & isa2) != 0)
>           && ix86_builtins_isa[i].set_and_not_built_p)
>         {
>           tree decl, type;
> @@ -36549,7 +36550,7 @@ ix86_expand_builtin (tree exp, rtx targe
>       whether it is supported.  */
>    if ((ix86_builtins_isa[fcode].isa
>         && !(ix86_builtins_isa[fcode].isa & ix86_isa_flags))
> -      && (ix86_builtins_isa[fcode].isa2
> +      || (ix86_builtins_isa[fcode].isa2
>           && !(ix86_builtins_isa[fcode].isa2 & ix86_isa_flags2)))
>      {
>        char *opts = ix86_target_string (ix86_builtins_isa[fcode].isa,
> @@ -38514,7 +38515,7 @@ static tree ix86_get_builtin (enum ix86_
>    opts = TREE_TARGET_OPTION (target_tree);
>
>    if ((ix86_builtins_isa[(int) code].isa & opts->x_ix86_isa_flags)
> -       && (ix86_builtins_isa[(int) code].isa2 & opts->x_ix86_isa_flags2))
> +      || (ix86_builtins_isa[(int) code].isa2 & opts->x_ix86_isa_flags2))
>      return ix86_builtin_decl (code, true);
>    else
>      return NULL_TREE;
>
>
>         Jakub
Jakub Jelinek Nov. 19, 2016, 11:28 a.m. UTC | #2
On Sat, Nov 19, 2016 at 11:17:55AM +0100, Uros Bizjak wrote:
> > Here is another patch I'm going to test which fixes many other FAILs, but
> > still some are left:
> > FAIL: gcc.target/i386/funcspec-3.c (internal compiler error)
> > FAIL: gcc.target/i386/funcspec-3.c (test for excess errors)
> > FAIL: gcc.target/i386/mvc1.c (internal compiler error)
> > FAIL: gcc.target/i386/mvc1.c (test for excess errors)
> > FAIL: gcc.target/i386/mvc6.c (internal compiler error)
> > FAIL: gcc.target/i386/mvc6.c (test for excess errors)
> > FAIL: gcc.target/i386/mvc6.c scan-assembler vpshufb
> > FAIL: gcc.target/i386/mvc6.c scan-assembler punpcklbw
> > FAIL: gcc.target/i386/mvc8.c (internal compiler error)
> > FAIL: gcc.target/i386/mvc8.c (test for excess errors)
> > FAIL: gcc.target/i386/pr67995-2.c (internal compiler error)
> > FAIL: gcc.target/i386/pr67995-2.c (test for excess errors)
> > FAIL: gcc.target/i386/pr71652-3.c (internal compiler error)
> > FAIL: gcc.target/i386/pr71652-3.c  (test for errors, line 5)
> > FAIL: gcc.target/i386/pr71652-3.c (test for excess errors)
> 
> I wonder why patch submitter didn't get these failures during
> regtesting. There are plenty of tests (the above multi-vrsioning
> tests) that depend on correct handling of ISA variables. I assumed
> that these tests passed and consequently didn't went deep into the
> implementation, but rather requested a couple of additional tests that
> exercised added functionality.some more.

Dunno, clearly the patch has not been tested at all, at least not in
the form that has been checked in.
I've now bootstrapped/regtested on x86_64-linux and i686-linux all these
3 patches:
http://gcc.gnu.org/ml/gcc-patches/2016-11/msg01992.html
http://gcc.gnu.org/ml/gcc-patches/2016-11/msg02026.html
http://gcc.gnu.org/ml/gcc-patches/2016-11/msg02027.html
, e.g. on x86_64-linux they fix:
-FAIL: gcc.target/i386/avx-2.c (internal compiler error)
-FAIL: gcc.target/i386/avx-2.c (test for excess errors)
-FAIL: gcc.target/i386/avx2-gather-2.c scan-tree-dump-times vect "note: vectorized 1 loops in function" 16
-FAIL: gcc.target/i386/avx2-gather-6.c scan-tree-dump-times vect "note: vectorized 1 loops in function" 1
-FAIL: gcc.target/i386/avx512f-ceil-sfix-vec-2.c scan-assembler-times vcvttpd2dq[^\\n]*zmm[0-9].{7}(?:\\n|[ \\\\t]+#) 2
-FAIL: gcc.target/i386/avx512f-ceil-sfix-vec-2.c scan-assembler-times vrndscalepd[^\\n]*zmm[0-9](?:\\n|[ \\\\t]+#) 2
-FAIL: gcc.target/i386/avx512f-ceil-vec-2.c scan-assembler-times vrndscalepd[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-ceilf-sfix-vec-2.c scan-assembler-times vcvttps2dq[^\\n]+zmm[0-9].{7}(?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-ceilf-sfix-vec-2.c scan-assembler-times vrndscaleps[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-ceilf-vec-2.c scan-assembler-times vrndscaleps[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-floor-sfix-vec-2.c scan-assembler-times vcvttpd2dq[^\\n]*zmm[0-9].{7}(?:\\n|[ \\\\t]+#) 2
-FAIL: gcc.target/i386/avx512f-floor-sfix-vec-2.c scan-assembler-times vrndscalepd[^\\n]*zmm[0-9](?:\\n|[ \\\\t]+#) 2
-FAIL: gcc.target/i386/avx512f-floor-vec-2.c scan-assembler-times vrndscalepd[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-floorf-sfix-vec-2.c scan-assembler-times vcvttps2dq[^\\n]+zmm[0-9].{7}(?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-floorf-sfix-vec-2.c scan-assembler-times vrndscaleps[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-floorf-vec-2.c scan-assembler-times vrndscaleps[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-gather-2.c scan-tree-dump-times vect "note: vectorized 1 loops in function" 16
-FAIL: gcc.target/i386/avx512f-gather-5.c scan-assembler-times gather[^\\n]*zmm[0-9]+{%k[1-7]}(?:\\n|[ \\\\t]+#) 2
-FAIL: gcc.target/i386/avx512f-rint-sfix-vec-2.c scan-assembler-times vcvtpd2dq[^\\n]+ymm[0-9](?:\\n|[ \\\\t]+#) 2
-FAIL: gcc.target/i386/avx512f-rint-sfix-vec-2.c scan-assembler-times vinserti64x4[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-rintf-sfix-vec-2.c scan-assembler-times vcvtps2dq[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-round-sfix-vec-2.c scan-assembler-times vcvttpd2dq[^\\n]+zmm[0-9].{7}(?:\\n|[ \\\\t]+#) 2
-FAIL: gcc.target/i386/avx512f-round-sfix-vec-2.c scan-assembler-times vrndscalepd[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 2
-FAIL: gcc.target/i386/avx512f-roundf-sfix-vec-2.c scan-assembler-times vcvttps2dq[^\\n]+zmm[0-9].{7}(?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-roundf-sfix-vec-2.c scan-assembler-times vrndscaleps[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-trunc-vec-2.c scan-assembler-times vrndscalepd[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/avx512f-truncf-vec-2.c scan-assembler-times vrndscaleps[^\\n]+zmm[0-9](?:\\n|[ \\\\t]+#) 1
-FAIL: gcc.target/i386/funcspec-8.c  (test for errors, line 104)
-FAIL: gcc.target/i386/funcspec-8.c  (test for errors, line 123)
-FAIL: gcc.target/i386/funcspec-8.c  (test for errors, line 142)
-FAIL: gcc.target/i386/funcspec-8.c  (test for errors, line 161)
-FAIL: gcc.target/i386/funcspec-8.c  (test for errors, line 28)
-FAIL: gcc.target/i386/funcspec-8.c  (test for errors, line 47)
-FAIL: gcc.target/i386/funcspec-8.c  (test for errors, line 66)
-FAIL: gcc.target/i386/funcspec-8.c  (test for errors, line 85)
-FAIL: gcc.target/i386/funcspec-8.c (internal compiler error)
-FAIL: gcc.target/i386/funcspec-8.c (test for excess errors)
-FAIL: gcc.target/i386/mvc1.c (internal compiler error)
-FAIL: gcc.target/i386/mvc1.c (test for excess errors)
-UNRESOLVED: gcc.target/i386/mvc1.c compilation failed to produce executable
-FAIL: gcc.target/i386/mvc6.c (test for excess errors)
-UNRESOLVED: gcc.target/i386/mvc6.c scan-assembler punpcklbw
-UNRESOLVED: gcc.target/i386/mvc6.c scan-assembler vpshufb
-FAIL: gcc.target/i386/mvc8.c (internal compiler error)
-FAIL: gcc.target/i386/mvc8.c (test for excess errors)
-UNRESOLVED: gcc.target/i386/mvc8.c scan-assembler-not constprop
 FAIL: gcc.target/i386/pr45685.c scan-assembler-times cmov 6
-FAIL: gcc.target/i386/pr67995-1.c  (test for errors, line 11)
-FAIL: gcc.target/i386/pr67995-1.c (internal compiler error)
-FAIL: gcc.target/i386/pr67995-1.c (test for excess errors)
-FAIL: gcc.target/i386/pr67995-2.c (internal compiler error)
-FAIL: gcc.target/i386/pr67995-2.c (test for excess errors)
-FAIL: gcc.target/i386/pr69255-1.c  (test for errors, line 13)
-FAIL: gcc.target/i386/pr69255-1.c  (test for warnings, line 13)
-FAIL: gcc.target/i386/pr69255-1.c (internal compiler error)
-FAIL: gcc.target/i386/pr69255-1.c (test for excess errors)
-FAIL: gcc.target/i386/pr69255-2.c  (test for errors, line 13)
-FAIL: gcc.target/i386/pr69255-2.c  (test for warnings, line 13)
-FAIL: gcc.target/i386/pr69255-2.c  (test for warnings, line 13)
-FAIL: gcc.target/i386/pr69255-2.c (internal compiler error)
-FAIL: gcc.target/i386/pr69255-2.c (test for excess errors)
-FAIL: gcc.target/i386/pr69255-3.c  (test for errors, line 13)
-FAIL: gcc.target/i386/pr69255-3.c  (test for warnings, line 13)
-FAIL: gcc.target/i386/pr69255-3.c (internal compiler error)
-FAIL: gcc.target/i386/pr69255-3.c (test for excess errors)
-FAIL: gcc.target/i386/pr71652-3.c  (test for errors, line 5)
-FAIL: gcc.target/i386/pr71652-3.c (internal compiler error)
-FAIL: gcc.target/i386/pr71652-3.c (test for excess errors)
-FAIL: gcc.target/i386/sse-22a.c (internal compiler error)
-FAIL: gcc.target/i386/sse-22a.c (test for excess errors)
-WARNING: program timed out.
-FAIL: g++.dg/ext/mv6.C  -std=gnu++11 (internal compiler error)
-FAIL: g++.dg/ext/mv6.C  -std=gnu++11 (test for excess errors)
-UNRESOLVED: g++.dg/ext/mv6.C  -std=gnu++11 compilation failed to produce executable
-FAIL: g++.dg/ext/mv6.C  -std=gnu++14 (internal compiler error)
-FAIL: g++.dg/ext/mv6.C  -std=gnu++14 (test for excess errors)
-UNRESOLVED: g++.dg/ext/mv6.C  -std=gnu++14 compilation failed to produce executable
-FAIL: g++.dg/ext/mv6.C  -std=gnu++98 (internal compiler error)
-FAIL: g++.dg/ext/mv6.C  -std=gnu++98 (test for excess errors)
-UNRESOLVED: g++.dg/ext/mv6.C  -std=gnu++98 compilation failed to produce executable
-FAIL: g++.dg/ext/mvc1.C  -std=c++11 (internal compiler error)
-FAIL: g++.dg/ext/mvc1.C  -std=c++11 (test for excess errors)
-UNRESOLVED: g++.dg/ext/mvc1.C  -std=c++11 compilation failed to produce executable
-FAIL: g++.dg/ext/mvc1.C  -std=c++14 (internal compiler error)
-FAIL: g++.dg/ext/mvc1.C  -std=c++14 (test for excess errors)
-UNRESOLVED: g++.dg/ext/mvc1.C  -std=c++14 compilation failed to produce executable
-FAIL: g++.dg/ext/mvc1.C  -std=c++98 (internal compiler error)
-FAIL: g++.dg/ext/mvc1.C  -std=c++98 (test for excess errors)
-UNRESOLVED: g++.dg/ext/mvc1.C  -std=c++98 compilation failed to produce executable
-FAIL: g++.dg/ext/pr57548.C  -std=c++11 (internal compiler error)
-FAIL: g++.dg/ext/pr57548.C  -std=c++11 (test for excess errors)
-FAIL: g++.dg/ext/pr57548.C  -std=c++14 (internal compiler error)
-FAIL: g++.dg/ext/pr57548.C  -std=c++14 (test for excess errors)
-FAIL: g++.dg/ext/pr57548.C  -std=c++98 (internal compiler error)
-FAIL: g++.dg/ext/pr57548.C  -std=c++98 (test for excess errors)

On x86_64-linux with the 3 patches I'm not seeing any new FAILs
compared to before r242569, on i686-linux there is still:
+FAIL: gcc.target/i386/pr57756.c  (test for errors, line 6)
+FAIL: gcc.target/i386/pr57756.c  (test for warnings, line 14)
compared to pre-r242569 (so some further fix is needed).

	Jakub
Andrew Senkevich Nov. 19, 2016, 2:04 p.m. UTC | #3
2016-11-19 13:17 GMT+03:00 Uros Bizjak <ubizjak@gmail.com>:
> On Sat, Nov 19, 2016 at 9:05 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>> On Fri, Nov 18, 2016 at 09:30:06PM +0100, Jakub Jelinek wrote:
>>> On Fri, Nov 18, 2016 at 08:41:01PM +0100, Jakub Jelinek wrote:
>>> > I'm seeing lots of ICEs with this.
>>>
>>> Here is untested fix for that, will bootstrap/regtest it soon (after my
>>> current set of bootstraps finishes).
>>>
>>> 2016-11-18  Jakub Jelinek  <jakub@redhat.com>
>>>
>>>       * config/i386/i386.c (ix86_expand_builtin): Remove msk_mov variable,
>>>       don't initialize it, don't use it for the case where it isn't
>>>       provable %{z} nor using the same argument, instead move merge
>>>       argument into a new pseudo and use that as target.  Formatting fixes.
>>
>> Now successfully bootstrapped/regtested on x86_64-linux and i686-linux and
>> fixed a couple of FAILs, but not tons of others.
>>
>> Here is another patch I'm going to test which fixes many other FAILs, but
>> still some are left:
>> FAIL: gcc.target/i386/funcspec-3.c (internal compiler error)
>> FAIL: gcc.target/i386/funcspec-3.c (test for excess errors)
>> FAIL: gcc.target/i386/mvc1.c (internal compiler error)
>> FAIL: gcc.target/i386/mvc1.c (test for excess errors)
>> FAIL: gcc.target/i386/mvc6.c (internal compiler error)
>> FAIL: gcc.target/i386/mvc6.c (test for excess errors)
>> FAIL: gcc.target/i386/mvc6.c scan-assembler vpshufb
>> FAIL: gcc.target/i386/mvc6.c scan-assembler punpcklbw
>> FAIL: gcc.target/i386/mvc8.c (internal compiler error)
>> FAIL: gcc.target/i386/mvc8.c (test for excess errors)
>> FAIL: gcc.target/i386/pr67995-2.c (internal compiler error)
>> FAIL: gcc.target/i386/pr67995-2.c (test for excess errors)
>> FAIL: gcc.target/i386/pr71652-3.c (internal compiler error)
>> FAIL: gcc.target/i386/pr71652-3.c  (test for errors, line 5)
>> FAIL: gcc.target/i386/pr71652-3.c (test for excess errors)
>
> I wonder why patch submitter didn't get these failures during
> regtesting. There are plenty of tests (the above multi-vrsioning
> tests) that depend on correct handling of ISA variables. I assumed
> that these tests passed and consequently didn't went deep into the
> implementation, but rather requested a couple of additional tests that
> exercised added functionality.some more.

Completely my bad. Starting from addition last intrinsics testing gone wrong.
Will double check next time to avoid repeating in the future.

>> Will debug even those.

Thank you, Jakub.
diff mbox

Patch

--- gcc/config/i386/i386.c.jj	2016-11-18 22:30:16.000000000 +0100
+++ gcc/config/i386/i386.c	2016-11-19 08:37:45.748175866 +0100
@@ -30924,7 +30924,7 @@  def_builtin (HOST_WIDE_INT mask, const c
 	 means that *both* cpuid bits must be set for the built-in to be available.
 	 Handle this here.  */
       if (mask & ix86_isa_flags & OPTION_MASK_ISA_AVX512VL)
-	  mask &= ~OPTION_MASK_ISA_AVX512VL;
+	mask &= ~OPTION_MASK_ISA_AVX512VL;
 
       mask &= ~OPTION_MASK_ISA_64BIT;
       if (mask == 0
@@ -30976,8 +30976,8 @@  def_builtin_const (HOST_WIDE_INT mask, c
 
 static inline tree
 def_builtin2 (HOST_WIDE_INT mask, const char *name,
-	     enum ix86_builtin_func_type tcode,
-	     enum ix86_builtins code)
+	      enum ix86_builtin_func_type tcode,
+	      enum ix86_builtins code)
 {
   tree decl = NULL_TREE;
 
@@ -30992,8 +30992,8 @@  def_builtin2 (HOST_WIDE_INT mask, const
       tree type = ix86_get_builtin_func_type (tcode);
       decl = add_builtin_function (name, type, code, BUILT_IN_MD,
 				   NULL, NULL_TREE);
-	  ix86_builtins[(int) code] = decl;
-	  ix86_builtins_isa[(int) code].set_and_not_built_p = false;
+      ix86_builtins[(int) code] = decl;
+      ix86_builtins_isa[(int) code].set_and_not_built_p = false;
     }
   else
     {
@@ -31016,7 +31016,7 @@  def_builtin2 (HOST_WIDE_INT mask, const
 
 static inline tree
 def_builtin_const2 (HOST_WIDE_INT mask, const char *name,
-		   enum ix86_builtin_func_type tcode, enum ix86_builtins code)
+		    enum ix86_builtin_func_type tcode, enum ix86_builtins code)
 {
   tree decl = def_builtin2 (mask, name, tcode, code);
   if (decl)
@@ -31034,8 +31034,8 @@  def_builtin_const2 (HOST_WIDE_INT mask,
 static void
 ix86_add_new_builtins (HOST_WIDE_INT isa, HOST_WIDE_INT isa2)
 {
-  if (((isa & deferred_isa_values) == 0)
-      && ((isa2 & deferred_isa_values2) == 0))
+  if ((isa & deferred_isa_values) == 0
+      && (isa2 & deferred_isa_values2) == 0)
     return;
 
   /* Bits in ISA value can be removed from potential isa values.  */
@@ -31048,7 +31048,8 @@  ix86_add_new_builtins (HOST_WIDE_INT isa
 
   for (i = 0; i < (int)IX86_BUILTIN_MAX; i++)
     {
-      if ((((ix86_builtins_isa[i].isa & isa) != 0) || ((ix86_builtins_isa[i].isa2 & isa2) != 0))
+      if (((ix86_builtins_isa[i].isa & isa) != 0
+	   || (ix86_builtins_isa[i].isa2 & isa2) != 0)
 	  && ix86_builtins_isa[i].set_and_not_built_p)
 	{
 	  tree decl, type;
@@ -36549,7 +36550,7 @@  ix86_expand_builtin (tree exp, rtx targe
      whether it is supported.  */
   if ((ix86_builtins_isa[fcode].isa
        && !(ix86_builtins_isa[fcode].isa & ix86_isa_flags))
-      && (ix86_builtins_isa[fcode].isa2
+      || (ix86_builtins_isa[fcode].isa2
 	  && !(ix86_builtins_isa[fcode].isa2 & ix86_isa_flags2)))
     {
       char *opts = ix86_target_string (ix86_builtins_isa[fcode].isa,
@@ -38514,7 +38515,7 @@  static tree ix86_get_builtin (enum ix86_
   opts = TREE_TARGET_OPTION (target_tree);
 
   if ((ix86_builtins_isa[(int) code].isa & opts->x_ix86_isa_flags)
-	&& (ix86_builtins_isa[(int) code].isa2 & opts->x_ix86_isa_flags2))
+      || (ix86_builtins_isa[(int) code].isa2 & opts->x_ix86_isa_flags2))
     return ix86_builtin_decl (code, true);
   else
     return NULL_TREE;