emit_insn (gen_vec_extract_hi_v16si (tmp[3], operands[1]));
emit_insn (gen_floatv8siv8df2 (tmp[2], tmp[3]));
- emit_insn (gen_rtx_SET (k, gen_rtx_LT (QImode, tmp[2], tmp[0])));
+ ix86_expand_mask_vec_cmp (k, LT, tmp[2], tmp[0]);
emit_insn (gen_addv8df3_mask (tmp[2], tmp[2], tmp[1], tmp[2], k));
emit_move_insn (operands[0], tmp[2]);
DONE;
k = gen_reg_rtx (QImode);
emit_insn (gen_avx512f_cvtdq2pd512_2 (tmp[2], operands[1]));
- emit_insn (gen_rtx_SET (k, gen_rtx_LT (QImode, tmp[2], tmp[0])));
+ ix86_expand_mask_vec_cmp (k, LT, tmp[2], tmp[0]);
emit_insn (gen_addv8df3_mask (tmp[2], tmp[2], tmp[1], tmp[2], k));
emit_move_insn (operands[0], tmp[2]);
DONE;
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f -mprefer-vector-width=512" } */
+
+unsigned int a[256];
+double b[256];
+
+void
+__attribute__ ((noipa, optimize ("tree-vectorize")))
+foo(void)
+{
+ int i;
+
+ for (i=0; i<256; ++i)
+ b[i] = a[i];
+}
+
+/* { dg-final { scan-assembler "vcvtdq2pd\[^\n\]*zmm" } } */
+
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f -mprefer-vector-width=512" } */
+/* { dg-require-effective-target avx512f } */
+
+#ifndef CHECK
+#define CHECK "avx512f-helper.h"
+#endif
+
+#include CHECK
+
+#ifndef TEST
+#define TEST test_512
+#endif
+
+#include "avx512f-pr96551-1.c"
+
+void
+test_512 (void)
+{
+ double exp[256];
+ for (int i = 0; i != 256; i++)
+ {
+ a[i] = i * i + 3 * i + 13;
+ exp[i] = a[i];
+ b[i] = 0;
+ }
+
+ foo ();
+
+ for (int i = 0; i != 256; i++)
+ if (exp[i] != b[i])
+ abort ();
+}