https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98833
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- If two insns with the same RTL match, then the first one wins. But the vpcom instructions have different RTL, so I see no reason for the !TARGET_XOP. grepping for sse2_eq I see only: i386-builtin.def:BDESC (OPTION_MASK_ISA_SSE2, 0, CODE_FOR_sse2_eqv16qi3, "__builtin_ia32_pcmpeqb128", IX86_BUILTIN_PCMPEQB128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V16QI) i386-builtin.def:BDESC (OPTION_MASK_ISA_SSE2, 0, CODE_FOR_sse2_eqv8hi3, "__builtin_ia32_pcmpeqw128", IX86_BUILTIN_PCMPEQW128, UNKNOWN, (int) V8HI_FTYPE_V8HI_V8HI) i386-builtin.def:BDESC (OPTION_MASK_ISA_SSE2, 0, CODE_FOR_sse2_eqv4si3, "__builtin_ia32_pcmpeqd128", IX86_BUILTIN_PCMPEQD128, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI ) sse.md:(define_insn "*sse2_eq<mode>3" sse.md:(define_expand "sse2_eq<mode>3" and those 3 builtins are never used in the headers, so we could as well just remove them and remove the define_expand too (of course keep *sse2_eq with the !TARGET_XOP dropped). Also, grepping for avx2_eq I see: grep avx2_eq * i386-builtin.def:BDESC (OPTION_MASK_ISA_AVX2, 0, CODE_FOR_avx2_eqv32qi3, "__builtin_ia32_pcmpeqb256", IX86_BUILTIN_PCMPEQB256, UNKNOWN, (int) V32QI_FTYPE_V32QI_V32QI) i386-builtin.def:BDESC (OPTION_MASK_ISA_AVX2, 0, CODE_FOR_avx2_eqv16hi3, "__builtin_ia32_pcmpeqw256", IX86_BUILTIN_PCMPEQW256, UNKNOWN, (int) V16HI_FTYPE_V16HI_V16HI) i386-builtin.def:BDESC (OPTION_MASK_ISA_AVX2, 0, CODE_FOR_avx2_eqv8si3, "__builtin_ia32_pcmpeqd256", IX86_BUILTIN_PCMPEQD256, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI ) i386-builtin.def:BDESC (OPTION_MASK_ISA_AVX2, 0, CODE_FOR_avx2_eqv4di3, "__builtin_ia32_pcmpeqq256", IX86_BUILTIN_PCMPEQQ256, UNKNOWN, (int) V4DI_FTYPE_V4DI_V4DI ) sse.md:(define_expand "avx2_eq<mode>3" sse.md:(define_insn "*avx2_eq<mode>3" sse.md:(define_insn_and_split "*avx2_eq<mode>3" so perhaps again drop the builtins and expander? Ditto sse2_gt (no expander, rename insn to *sse2_gt and drop builtins). For avx2_gt we actually use the expander in one spot, but don't use the builtins.