+2014-12-10 Jakub Jelinek <jakub@redhat.com>
+ Evgeny Stupachenko <evstupac@gmail.com>
+
+ PR target/64252
+ * config/i386/i386.c (expand_vec_perm_pblendv): If not testing_p,
+ set dcopy.target to a new pseudo.
+
2014-12-10 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (*add<mode>3): Remove condition.
+2014-12-10 Jakub Jelinek <jakub@redhat.com>
+ Evgeny Stupachenko <evstupac@gmail.com>
+
+ PR target/64252
+ * gcc.dg/vect/pr64252.c: New test.
+ * gcc.dg/pr64252.c: New test.
+ * gcc.target/i386/avx2-pr64252.c: New test.
+
2014-12-10 Ilya Enkovich <ilya.enkovich@intel.com>
* gcc.dg/lto/chkp-privatize_0.c: Remove unneeded selector
--- /dev/null
+/* PR target/64252 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+typedef unsigned int V __attribute__((vector_size (32)));
+
+__attribute__((noinline, noclone)) void
+foo (V *a, V *b, V *c, V *d, V *e)
+{
+ V t = __builtin_shuffle (*a, *b, *c);
+ V v = __builtin_shuffle (t, (V) { ~0U, ~0U, ~0U, ~0U, ~0U, ~0U, ~0U, ~0U }, (V) { 0, 1, 8, 3, 4, 5, 9, 7 });
+ v = v + *d;
+ *e = v;
+}
+
+int
+main ()
+{
+ V a, b, c, d, e;
+ int i;
+ a = (V) { 1, 2, 3, 4, 5, 6, 7, 8 };
+ b = (V) { 9, 10, 11, 12, 13, 14, 15, 16 };
+ c = (V) { 1, 3, 5, 7, 9, 11, 13, 15 };
+ d = (V) { 0, 0, 0, 0, 0, 0, 0, 0 };
+ foo (&a, &b, &c, &d, &e);
+ for (i = 0; i < 8; i++)
+ if (e[i] != ((i == 2 || i == 6) ? ~0U : 2 + 2 * i))
+ __builtin_abort ();
+ return 0;
+}
--- /dev/null
+/* PR target/64252 */
+/* Test correctness of size 3 store groups permutation. */
+/* { dg-do run } */
+/* { dg-additional-options "-O3" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+#define N 50
+
+enum num3
+{
+ a, b, c
+};
+
+struct flags
+{
+ enum num3 f;
+ unsigned int c;
+ unsigned int p;
+};
+
+struct flagsN
+{
+ struct flags a[N];
+};
+
+void
+bar (int n, struct flagsN *ff)
+{
+ struct flagsN *fc;
+ for (fc = ff + 1; fc < (ff + n); fc++)
+ {
+ int i;
+ for (i = 0; i < N; ++i)
+ {
+ ff->a[i].f = 0;
+ ff->a[i].c = i;
+ ff->a[i].p = -1;
+ }
+ for (i = 0; i < n; i++)
+ {
+ int j;
+ for (j = 0; j < N - n; ++j)
+ {
+ fc->a[i + j].f = 0;
+ fc->a[i + j].c = j + i;
+ fc->a[i + j].p = -1;
+ }
+ }
+ }
+}
+
+struct flagsN q[2];
+
+int main()
+{
+ int i;
+ check_vect ();
+ bar(2, q);
+ for (i = 0; i < N; i++)
+ if (q[0].a[i].f != 0 || q[0].a[i].c != i || q[0].a[i].p != -1)
+ abort ();
+ return 0;
+}
+/* { dg-final { cleanup-tree-dump "vect" } } */