On 14/06/2012, at 6:59 AM, Richard Sandiford wrote: > Maxim Kuvyrkov <ma...@codesourcery.com> writes: >> + /* Don't bother setting returns that are never used. */ >> + if (cmp && find_reg_note (insn, REG_UNUSED, cmp)) >> + cmp = 0; >> + if (required_oldval && find_reg_note (insn, REG_UNUSED, required_oldval)) >> + required_oldval = 0; > > required_oldval is an important input (not output). We can't drop it. > I suppose we could replace oldval with AT if the non-AT register isn't used, > but I'm not sure it's worth it. > > The CMP part is OK though.
Thanks for pointing this out. The optimization was motivated by the CMP part, as this is what's needed to generate same assembly as GLIBC has. -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics