https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103750
--- Comment #18 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by hongtao Liu <liuho...@gcc.gnu.org>: https://gcc.gnu.org/g:599bca27dc37b3f7979bd6af30a357104f2b90c1 commit r16-105-g599bca27dc37b3f7979bd6af30a357104f2b90c1 Author: liuhongt <hongtao....@intel.com> Date: Mon Apr 7 23:50:53 2025 -0700 target: [PR103750] Also handle avx512 kmask & immediate 15 or 3 when VF is 4/2. Since the upper bits are already cleared by the comparison instructions. gcc/ChangeLog: PR target/103750 * config/i386/sse.md (*<avx512>_cmp<mode>3_and15): New define_insn. (*<avx512>_ucmp<mode>3_and15): Ditto. (*<avx512>_cmp<mode>3_and3): Ditto. (*avx512vl_ucmpv2di3_and3): Ditto. (*<avx512>_cmp<V48H_AVX512VL:mode>3_zero_extend<SWI248x:mode>): Change operands[3] predicate to <cmp_imm_predicate>. (*<avx512>_cmp<V48H_AVX512VL:mode>3_zero_extend<SWI248x:mode>_2): Ditto. (*<avx512>_cmp<mode>3): Add GET_MODE_NUNITS (<MODE>mode) >= 8 to the condition. (*<avx512>_ucmp<mode>3): Ditto. (V48_AVX512VL_4): New mode iterator. (VI48_AVX512VL_4): Ditto. (V8_AVX512VL_2): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/avx512vl-pr103750-1.c: New test. * gcc.target/i386/avx512f-pr96891-3.c: Adjust testcase. * gcc.target/i386/avx512f-vpcmpgtuq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpeqq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpequq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpgeq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpgeuq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpgtq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpgtuq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpleq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpleuq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpltq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpltuq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpneqq-1.c: Ditto. * gcc.target/i386/avx512vl-vpcmpnequq-1.c: Ditto.