https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98348
--- Comment #21 from Hongtao.liu <crazylht at gmail dot com> --- (In reply to Dávid Bolvanský from comment #20) > Some small regression (missed opportunity to use vptestnmd): > > Current trunk > > compare(unsigned int __vector(16)): > vpxor xmm1, xmm1, xmm1 > vpcmpd k0, zmm0, zmm1, 0 > vpmovm2d zmm0, k0 > ret > > GCC 9.2 > > compare(unsigned int __vector(16)): > vptestnmd k0, zmm0, zmm0 > vpmovm2d zmm0, k0 > ret > > > https://gcc.godbolt.org/z/5vK68jM3r I'm testing +(define_insn_and_split "*<avx512>_eq<mode>3" + [(set (match_operand:<avx512fmaskmode> 0 "register_operand") + (unspec:<avx512fmaskmode> + [(match_operand:VI_AVX512BW 1 "nonimm_or_0_operand") + (match_operand:VI_AVX512BW 2 "nonimm_or_0_operand") + (const_int 0)] + UNSPEC_PCMP_ITER))] + "TARGET_AVX512F && ix86_pre_reload_split () + && (operands[1] == CONST0_RTX (<MODE>mode) + || operands[2] == CONST0_RTX (<MODE>mode))" + "#" + "&& 1" + [(set (match_dup 0) + (unspec:<avx512fmaskmode> + [(match_dup 1) (match_dup 2)] + UNSPEC_MASKED_EQ))]) +