@@ -18142,7 +18142,7 @@ (define_insn_and_split "*avx2_pcmp<mode>3_7"
[(match_operand:VI_128_256 3 "nonimmediate_operand")
(match_operand:VI_128_256 4 "nonimmediate_operand")
(match_operand:SI 5 "const_0_to_7_operand")]
- UNSPEC_PCMP_ITER)))]
+ UNSPEC_PCMP)))]
"TARGET_AVX512VL && ix86_pre_reload_split ()
/* NE is commutative. */
&& (INTVAL (operands[5]) == 4
@@ -18165,6 +18165,31 @@ (define_insn_and_split "*avx2_pcmp<mode>3_7"
DONE;
})
+(define_insn_and_split "*avx2_pcmp<mode>3_8"
+ [(set (match_operand:VI_128_256 0 "register_operand")
+ (vec_merge:VI_128_256
+ (match_operand:VI_128_256 1 "const0_operand")
+ (match_operand:VI_128_256 2 "vector_all_ones_operand")
+ (unspec:<avx512fmaskmode>
+ [(match_operand:VI_128_256 3 "nonimmediate_operand")
+ (match_operand:VI_128_256 4 "nonimmediate_operand")
+ (match_operand:SI 5 "const_0_to_7_operand")]
+ UNSPEC_UNSIGNED_PCMP)))]
+ "TARGET_AVX512VL && ix86_pre_reload_split ()
+ /* NE is commutative. */
+ && INTVAL (operands[5]) == 4"
+
+ "#"
+ "&& 1"
+ [(const_int 0)]
+{
+ if (MEM_P (operands[3]))
+ operands[3] = force_reg (<MODE>mode, operands[3]);
+ emit_move_insn (operands[0], gen_rtx_fmt_ee (EQ, <MODE>mode,
+ operands[3], operands[4]));
+ DONE;
+})
+
(define_expand "<avx512>_eq<mode>3<mask_scalar_merge_name>"
[(set (match_operand:<avx512fmaskmode> 0 "register_operand")
(unspec:<avx512fmaskmode>
new file mode 100644
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512vl" } */
+/* { dg-require-effective-target avx512vl } */
+
+#define AVX512VL
+#include "avx512f-helper.h"
+
+typedef __attribute__((__vector_size__ (16))) unsigned V;
+
+short s;
+
+V
+foo ()
+{
+ return ~(-(V){ 0, 0, 0, 1 } <= s);
+}
+
+void
+test_128 ()
+{
+ V x = foo ();
+ if (x[0] != 0 || x[1] != 0 || x[2] != 0 || x[3] != 0xffffffff)
+ __builtin_abort();
+}
+
+void
+test_256 ()
+{}