]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/51387 (Test vect.exp/vect-116.c fails on execution when compiled with...
authorJakub Jelinek <jakub@redhat.com>
Fri, 2 Dec 2011 21:57:15 +0000 (22:57 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 2 Dec 2011 21:57:15 +0000 (22:57 +0100)
PR target/51387
* config/i386/sse.md (mul<mode>3 with VI1_AVX2 iterator): For
V32QImode use { 0,2,..,14,32,34,..,46,16,18,..,30,48,50,..,62 }
permutation instead of extract even permutation.

From-SVN: r181951

gcc/ChangeLog
gcc/config/i386/sse.md

index 7e7ebe0c7ce69e2dbdc406164b0ae3af2f427429..05706ab6691a6e7cd7d41836a5d8b6920b945cc1 100644 (file)
@@ -1,3 +1,10 @@
+2011-12-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/51387
+       * config/i386/sse.md (mul<mode>3 with VI1_AVX2 iterator): For
+       V32QImode use { 0,2,..,14,32,34,..,46,16,18,..,30,48,50,..,62 }
+       permutation instead of extract even permutation.
+
 2011-12-02  Nathan Sidwell  <nathan@acm.org>
 
        * gcov.c (struct arc_info): Add is_throw field.
index 8c434b79bb815987e80cf8435bf3456a17d3ea95..7da2f3453d5b8daa4d86d2954ae2c59d7011e9e3 100644 (file)
                                        gen_lowpart (mulmode, t[3]))));
 
   /* Extract the even bytes and merge them back together.  */
-  ix86_expand_vec_extract_even_odd (operands[0], t[5], t[4], 0);
+  if (<MODE>mode == V16QImode)
+    ix86_expand_vec_extract_even_odd (operands[0], t[5], t[4], 0);
+  else
+    {
+      /* Since avx2_interleave_{low,high}v32qi used above aren't cross-lane,
+        this can't be normal even extraction, but one where additionally
+        the second and third quarter are swapped.  That is even one insn
+        shorter than even extraction.  */
+      rtvec v = rtvec_alloc (32);
+      for (i = 0; i < 32; ++i)
+       RTVEC_ELT (v, i)
+         = GEN_INT (i * 2 + ((i & 24) == 8 ? 16 : (i & 24) == 16 ? -16 : 0));
+      t[0] = operands[0];
+      t[1] = t[5];
+      t[2] = t[4];
+      t[3] = gen_rtx_CONST_VECTOR (<MODE>mode, v);
+      ix86_expand_vec_perm_const (t);
+    }
 
   set_unique_reg_note (get_last_insn (), REG_EQUAL,
                       gen_rtx_MULT (<MODE>mode, operands[1], operands[2]));