re PR tree-optimization/69820 (Test miscompiled with -O3 option)
authorJakub Jelinek <jakub@redhat.com>
Fri, 19 Feb 2016 13:42:38 +0000 (14:42 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 19 Feb 2016 13:42:38 +0000 (14:42 +0100)
PR target/69820
* config/i386/sse.md (VI_512): Only include V64QImode and V32HImode
if TARGET_AVX512BW.

* gcc.target/i386/pr69820.c: New test.

From-SVN: r233558

gcc/ChangeLog
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr69820.c [new file with mode: 0644]

index 083e828..07b7338 100644 (file)
@@ -1,3 +1,9 @@
+2016-02-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/69820
+       * config/i386/sse.md (VI_512): Only include V64QImode and V32HImode
+       if TARGET_AVX512BW.
+
 2016-02-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
 
        * config/s390/vector.md: Add missing commutative operand markers
index 79c387f..49b99e4 100644 (file)
 (define_mode_iterator VI_256 [V32QI V16HI V8SI V4DI])
 
 ;; All 512bit vector integer modes
-(define_mode_iterator VI_512 [V64QI V32HI V16SI V8DI])
+(define_mode_iterator VI_512
+  [(V64QI "TARGET_AVX512BW")
+   (V32HI "TARGET_AVX512BW")
+   V16SI V8DI])
 
 ;; Various 128bit vector integer mode combinations
 (define_mode_iterator VI12_128 [V16QI V8HI])
index 4a0dbab..365ec1f 100644 (file)
@@ -1,3 +1,8 @@
+2016-02-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/69820
+       * gcc.target/i386/pr69820.c: New test.
+
 2016-02-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
 
        * gcc.target/s390/vector/int128-1.c: New test.
diff --git a/gcc/testsuite/gcc.target/i386/pr69820.c b/gcc/testsuite/gcc.target/i386/pr69820.c
new file mode 100644 (file)
index 0000000..8ce9778
--- /dev/null
@@ -0,0 +1,14 @@
+/* PR target/69820 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx512f -mno-avx512bw" } */
+
+int a[100], b[100];
+short c[100];
+
+void
+foo ()
+{
+  int i;
+  for (i = 0; i < 100; ++i)
+    b[i] = a[i] * (_Bool) c[i];
+}