summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authortocarip <tocarip@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-14 13:49:58 +0000
committertocarip <tocarip@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-14 13:49:58 +0000
commit1c699c146468571233317b7e9e12035f11e62b4a (patch)
tree40309240c1c3a6bc99e8c1098dcddc962998f45e /gcc
parent9f8bc6e813ccb5cb47c3d7f7b14a4aed474d8600 (diff)
downloadgcc-1c699c146468571233317b7e9e12035f11e62b4a.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219599 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/common/config/i386/i386-common.c5
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr64393.c12
5 files changed, 30 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d9ecac1a3e5..90414774303 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2014-01-14 Ilya Tocar <ilya.tocar@intel.com>
+ 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 <ilya.tocar@intel.com>
+
PR target/64387
* config/i386/sse.md (vec_unpacks_hi_v8sf): Fix predicate.
(vec_unpacks_hi_v16sf): Ditto.
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,5 +1,10 @@
2014-01-14 Ilya Tocar <ilya.tocar@intel.com>
+ PR target/64393
+ * gcc.target/i386/pr64393.c: New test.
+
+2014-01-14 Ilya Tocar <ilya.tocar@intel.com>
+
PR target/64387
* gcc.target/i386/pr64387.c: New test.
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;
+}