re PR target/65671 (Assembly failure (invalid register operand) with -O3 -mavx512vl)
authorKirill Yukhin <kirill.yukhin@intel.com>
Thu, 9 Apr 2015 21:37:28 +0000 (21:37 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Thu, 9 Apr 2015 21:37:28 +0000 (21:37 +0000)
PR target/65671
gcc/
* config/i386/sse.md: Generate vextract32x4 if AVX-512DQ
is disabled.

gcc/testsuite/
* gcc.target/i386/pr65671.c: New.

From-SVN: r221963

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

index 133007ffe2f17a84154a4ef3707b8790d51f400c..43a341e4e8bec94181471cba156b459b7f4b1017 100644 (file)
@@ -1,3 +1,9 @@
+2015-04-09  Kirill Yukhin  <kirill.yukhin@intel.com>
+
+       PR target/65671
+       * config/i386/sse.md: Generate vextract32x4 if AVX-512DQ
+       is disabled.
+
 2015-04-09  Gerald Pfeifer  <gerald@pfeifer.com>
 
        * doc/contrib.texi (Contributors): Add John Marino.
index 490fd6b6c3f9fc1cf0bd9d1a440a71374f62964e..6d3b54a28cf521e7d8e6a3d82e68c2c10a4a0c93 100644 (file)
        (vec_select:<ssehalfvecmode>
          (match_operand:VI8F_256 1 "register_operand" "v,v")
          (parallel [(const_int 2) (const_int 3)])))]
-  "TARGET_AVX"
+  "TARGET_AVX && <mask_avx512vl_condition> && <mask_avx512dq_condition>"
 {
-  if (TARGET_AVX512DQ && TARGET_AVX512VL)
-    return "vextract<shuffletype>64x2\t{$0x1, %1, %0<mask_operand2>|%0<mask_operand2>, %1, 0x1}";
+  if (TARGET_AVX512VL)
+  {
+    if (TARGET_AVX512DQ)
+      return "vextract<shuffletype>64x2\t{$0x1, %1, %0<mask_operand2>|%0<mask_operand2>, %1, 0x1}";
+    else
+      return "vextract<shuffletype>32x4\t{$0x1, %1, %0|%0, %1, 0x1}";
+  }
   else
     return "vextract<i128>\t{$0x1, %1, %0|%0, %1, 0x1}";
 }
index 4be085d3bbe018d6d4545da83abaec42a9c66f26..71305368f8538d66f6453ccdf735bd6ca9d1904a 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-09  Kirill Yukhin  <kirill.yukhin@intel.com>
+
+       PR target/65671
+       * gcc.target/i386/pr65671.c: New.
+
 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/65709
diff --git a/gcc/testsuite/gcc.target/i386/pr65671.c b/gcc/testsuite/gcc.target/i386/pr65671.c
new file mode 100644 (file)
index 0000000..8e5d00d
--- /dev/null
@@ -0,0 +1,15 @@
+/* PR target/65671 */
+/* { dg-do assemble } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2 -mavx512vl -ffixed-ymm16" } */
+
+#include <x86intrin.h>
+
+register __m256d a asm ("ymm16");
+__m128d b;
+
+void
+foo ()
+{
+  b = _mm256_extractf128_pd (a, 1);
+}