https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930
--- Comment #13 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Kazumoto Kojima from comment #12) > > --- a/config/sh/sh-protos.h > +++ b/config/sh/sh-protos.h > @@ -198,7 +198,7 @@ sh_find_set_of_reg (rtx reg, rtx_insn* insn, F stepfunc, > { > if (BARRIER_P (result.insn)) > break; > - if (!NONJUMP_INSN_P (result.insn)) > + if (!NONJUMP_INSN_P (result.insn) && !CALL_P (result.insn)) > continue; > if (reg_set_p (reg, result.insn)) > { > > and it works like as my expectation, though I'm not sure whether it's > a "right thing" or not. This would be OK for hardregs (which are clobbered by calls). When working on pseudos, it's actually OK to ignore calls. Maybe it'd be a good idea to extend sh_find_set_of_reg to check for call clobbered hardregs only. This will make the function easier to use.