https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103074
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |vmakarov at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The comment above ix86_hardreg_mov_ok doesn't match the implementation, it doesn't prevent it before reload but before and during reload (LRA). So I'd have expected: --- gcc/config/i386/i386.c 2021-11-22 10:07:01.336225481 +0100 +++ gcc/config/i386/i386.c 2021-11-22 18:54:22.288643063 +0100 @@ -19367,7 +19367,8 @@ ix86_hardreg_mov_ok (rtx dst, rtx src) ? standard_sse_constant_p (src, GET_MODE (dst)) : x86_64_immediate_operand (src, GET_MODE (dst))) && ix86_class_likely_spilled_p (REGNO_REG_CLASS (REGNO (dst))) - && !reload_completed) + && !reload_completed + && !lra_in_progress) return false; return true; } but, that doesn't really fix it and it is unclear what LRA is unhappy about to me.