https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70416
--- Comment #15 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Oleg Endo from comment #14) > > Maybe at that stage in the reload code it will end up using the last *addsi3 > pattern and not try to look for a new pattern in the .md when it wants to > change it. In other words, maybe it'll help if the *addsi3 patterns are > merged into a single pattern somehow. I'll give it a try... The following seems to fix the problem: Index: gcc/config/sh/sh.md =================================================================== --- gcc/config/sh/sh.md (revision 234258) +++ gcc/config/sh/sh.md (working copy) @@ -2248,7 +2248,7 @@ (plus:SI (match_operand:SI 1 "arith_reg_operand" "r") (match_operand:SI 2 "arith_or_int_operand" "rn")))] "TARGET_SH1 && !sh_lra_p () - && reload_completed + && (reload_completed || reload_in_progress) && !reg_overlap_mentioned_p (operands[0], operands[1])" "#" "&& 1"