PR rtl-optimization/84989
* simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
VEC_DUPLICATE with scalar result mode.
* gcc.target/i386/pr84989.c: New test.
From-SVN: r258709
+2018-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/84989
+ * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
+ VEC_DUPLICATE with scalar result mode.
+
2018-03-21 Martin Liska <mliska@suse.cz>
PR ipa/84963
break;
}
- if (VECTOR_MODE_P (mode) && vec_duplicate_p (op, &elt))
+ if (VECTOR_MODE_P (mode)
+ && vec_duplicate_p (op, &elt)
+ && code != VEC_DUPLICATE)
{
/* Try applying the operator to ELT and see if that simplifies.
We can duplicate the result if so.
+2018-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/84989
+ * gcc.target/i386/pr84989.c: New test.
+
2018-03-21 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.target/arm/pr82518.c: Require arm_neon_hw.
--- /dev/null
+/* PR rtl-optimization/84989 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+
+#include <x86intrin.h>
+
+__m512
+foo (float a, float *b)
+{
+ return _mm512_sub_ps (_mm512_broadcast_f32x4 (_mm_load_ps (b)),
+ _mm512_broadcast_f32x4 (_mm_set1_ps (a)));
+}