2019-07-03 Richard Biener <rguenther@suse.de>
PR middle-end/91069
* match.pd (vec_perm -> bit_insert): Fix element read from
first vector.
* gcc.dg/pr91069.c: New testcase.
From-SVN: r273007
+2019-07-03 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/91069
+ * match.pd (vec_perm -> bit_insert): Fix element read from
+ first vector.
+
2019-07-03 Martin Liska <mliska@suse.cz>
* dbgcnt.def (DEBUG_COUNTER): Add match debug counter.
first vector we only can insert the first elt from
the first vector. */
at = 0;
- if ((ins = fold_read_from_vector (cop0, 0)))
+ if ((ins = fold_read_from_vector (cop0, sel[0])))
op0 = op1;
}
else
+2019-07-03 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/91069
+ * gcc.dg/pr91069.c: New testcase.
+
2019-07-03 Martin Liska <mliska@suse.cz>
* gcc.dg/tree-prof/val-prof-2.c: Update scanned pattern
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-std=gnu11" } */
+
+typedef double v2df __attribute__((vector_size(16)));
+typedef long v2di __attribute__((vector_size(16)));
+
+void foo (v2df *res, v2df *src)
+{
+ v2df x = *src;
+ *res = __builtin_shuffle ((v2df) { 1.0, 0.0 }, x, (v2di) { 1, 3 });
+}
+
+int main()
+{
+ v2df x = (v2df) { 0.0, 2.0 };
+ foo (&x, &x);
+ if (x[0] != 0.0 || x[1] != 2.0)
+ __builtin_abort ();
+ return 0;
+}