+2020-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/93430
+ * config/i386/sse.md (*avx_vperm_broadcast_<mode>): Disallow for
+ TARGET_AVX2 and V4DFmode not in the split condition, but in the
+ pattern condition, though allow { 0, 0, 0, 0 } broadcast always.
+
2020-01-25 Feng Xue <fxue@os.amperecomputing.com>
PR ipa/93166
(match_operand:VF_256 1 "nonimmediate_operand" "m,o,?v")
(match_parallel 2 "avx_vbroadcast_operand"
[(match_operand 3 "const_int_operand" "C,n,n")])))]
- "TARGET_AVX"
+ "TARGET_AVX
+ && (<MODE>mode != V4DFmode || !TARGET_AVX2 || operands[3] == const0_rtx)"
"#"
- "&& reload_completed && (<MODE>mode != V4DFmode || !TARGET_AVX2)"
+ "&& reload_completed"
[(set (match_dup 0) (vec_duplicate:VF_256 (match_dup 1)))]
{
rtx op0 = operands[0], op1 = operands[1];
2020-01-26 Jakub Jelinek <jakub@redhat.com>
+ PR target/93430
+ * gcc.dg/pr93430.c: New test.
+ * gcc.target/i386/avx2-pr93430.c: New test.
+
PR ipa/93166
* g++.dg/pr93166.C: Move to ...
* g++.dg/pr93166_0.C: ... here. Turn it into a proper lto test.
--- /dev/null
+/* PR target/93430 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-mavx -mno-avx2" { target avx } } */
+
+typedef double V __attribute__((vector_size (4 * sizeof (double))));
+typedef long long VI __attribute__((vector_size (4 * sizeof (long long))));
+
+#if __SIZEOF_DOUBLE__ == __SIZEOF_LONG_LONG__
+void
+foo (V *x, V *y)
+{
+ y[0] = __builtin_shuffle (x[0], x[0], (VI) { 0, 0, 0, 0 });
+}
+
+void
+bar (V *x, V *y)
+{
+ y[0] = __builtin_shuffle (x[0], x[0], (VI) { 1, 1, 1, 1 });
+}
+
+void
+baz (V *x, V *y)
+{
+ y[0] = __builtin_shuffle (x[0], x[0], (VI) { 2, 2, 2, 2 });
+}
+
+void
+qux (V *x, V *y)
+{
+ y[0] = __builtin_shuffle (x[0], x[0], (VI) { 3, 3, 3, 3 });
+}
+#endif
--- /dev/null
+/* PR target/93430 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx2" } */
+
+#include "../../gcc.dg/pr93430.c"