This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/3] Avoid emitting useless instructions in mips_process_sync_loop.
Maxim Kuvyrkov <maxim@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.
Richard