From: Ilya Tocar Date: Wed, 14 Jan 2015 13:49:58 +0000 (+0000) Subject: re PR target/64393 (ICE: in extract_insn, at recog.c:2327 (unrecognizable insn) with... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c67917b65db04a4a52dc096f9ee59ed863789a1c;p=gcc.git re PR target/64393 (ICE: in extract_insn, at recog.c:2327 (unrecognizable insn) with -mavx512vbmi) PR target/64393 gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI_SET): Enable AVX512BW. (OPTION_MASK_ISA_AVX512BW_UNSET): Disable AVX512VBMI. * config/i386/i386.c (ix86_hard_regno_mode_ok): Don't check AVX512VBMI, as it implies AVX512BW. testsuite/ * gcc.target/i386/pr64393.c: New test. From-SVN: r219599 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9ecac1a3e5..90414774303 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2014-01-14 Ilya Tocar + + PR target/64393 + * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI_SET): + Enable AVX512BW. + (OPTION_MASK_ISA_AVX512BW_UNSET): Disable AVX512VBMI. + * config/i386/i386.c (ix86_hard_regno_mode_ok): Don't check + AVX512VBMI, as it implies AVX512BW. + 2014-01-14 Ilya Tocar PR target/64387 diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c index 77edb479b77..4e5687ae5ab 100644 --- a/gcc/common/config/i386/i386-common.c +++ b/gcc/common/config/i386/i386-common.c @@ -74,7 +74,7 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA_AVX512IFMA_SET \ (OPTION_MASK_ISA_AVX512IFMA | OPTION_MASK_ISA_AVX512F_SET) #define OPTION_MASK_ISA_AVX512VBMI_SET \ - (OPTION_MASK_ISA_AVX512VBMI | OPTION_MASK_ISA_AVX512F_SET) + (OPTION_MASK_ISA_AVX512VBMI | OPTION_MASK_ISA_AVX512BW_SET) #define OPTION_MASK_ISA_RTM_SET OPTION_MASK_ISA_RTM #define OPTION_MASK_ISA_PRFCHW_SET OPTION_MASK_ISA_PRFCHW #define OPTION_MASK_ISA_RDSEED_SET OPTION_MASK_ISA_RDSEED @@ -171,7 +171,8 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA_AVX512PF_UNSET OPTION_MASK_ISA_AVX512PF #define OPTION_MASK_ISA_AVX512ER_UNSET OPTION_MASK_ISA_AVX512ER #define OPTION_MASK_ISA_AVX512DQ_UNSET OPTION_MASK_ISA_AVX512DQ -#define OPTION_MASK_ISA_AVX512BW_UNSET OPTION_MASK_ISA_AVX512BW +#define OPTION_MASK_ISA_AVX512BW_UNSET \ + (OPTION_MASK_ISA_AVX512BW | OPTION_MASK_ISA_AVX512VBMI_UNSET) #define OPTION_MASK_ISA_AVX512VL_UNSET OPTION_MASK_ISA_AVX512VL #define OPTION_MASK_ISA_AVX512IFMA_UNSET OPTION_MASK_ISA_AVX512IFMA #define OPTION_MASK_ISA_AVX512VBMI_UNSET OPTION_MASK_ISA_AVX512VBMI diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7a39f800d89..91eae5ae3b5 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -41669,7 +41669,7 @@ ix86_hard_regno_mode_ok (int regno, machine_mode mode) return VALID_FP_MODE_P (mode); if (MASK_REGNO_P (regno)) return (VALID_MASK_REG_MODE (mode) - || ((TARGET_AVX512BW || TARGET_AVX512VBMI) + || (TARGET_AVX512BW && VALID_MASK_AVX512BW_MODE (mode))); if (BND_REGNO_P (regno)) return VALID_BND_REG_MODE (mode); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8febe145a92..12afaed3d82 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-01-14 Ilya Tocar + + PR target/64393 + * gcc.target/i386/pr64393.c: New test. + 2014-01-14 Ilya Tocar PR target/64387 diff --git a/gcc/testsuite/gcc.target/i386/pr64393.c b/gcc/testsuite/gcc.target/i386/pr64393.c new file mode 100644 index 00000000000..37a0e48a4cc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr64393.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-O -mavx512vbmi" } */ + +int a[1024]; + +void +foo (int i) +{ + for (;; i++) + if (a[i] != (i ^ (i * 3) ^ (i * 7))) + return; +}