https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Wouldn't the right fix be instead to move the ix86_expand_builtin HOST_WIDE_INT isa = ix86_isa_flags; HOST_WIDE_INT isa2 = ix86_isa_flags2; HOST_WIDE_INT bisa = ix86_builtins_isa[fcode].isa; HOST_WIDE_INT bisa2 = ix86_builtins_isa[fcode].isa2; ... if ((bisa & OPTION_MASK_ISA_MMX) && !TARGET_MMX && TARGET_MMX_WITH_SSE /* __builtin_ia32_maskmovq requires MMX registers. */ && fcode != IX86_BUILTIN_MASKMOVQ) { bisa &= ~OPTION_MASK_ISA_MMX; bisa |= OPTION_MASK_ISA_SSE2; } if ((bisa & isa) != bisa || (bisa2 & isa2) != bisa2) code into a helper function and simply return early in ix86_fold_builtin and ix86_gimple_fold_builtin if there is a mismatch (so effectively keep those md builtins as calls for the cases of mismatch and during expansion diagnose it?