Patch: Fix match_dup handling in web.c
Steven Bosscher
stevenb.gcc@gmail.com
Thu Mar 25 02:38:00 GMT 2010
On Wed, Mar 24, 2010 at 11:25 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> I found a number of bugs while testing an ARM patch that rewrites the
> ldm/stm peepholes.
>
> In web.c, there is code that tries to detect match_dups by comparing
> operands for equality; this is neither a necessary nor a sufficient
> condition. In particular, web.c cannot detect an input operand that
> match_dups an in-out output operand; this can result in web.c breaking
> match_dups and replacing only the inputs of an insn.
Hmm, this has always worked ever since web.c was contributed years
ago, you'd think that such a deficiency would have been a problem for
someone by now.
FWIW:
+ || DF_REF_REGNO (*dupref) < FIRST_PSEUDO_REGISTER)
can also be written as:
+ || HARD_REGISTER_NUM_P (DF_REF_REGNO (*dupref))
I'm also a bit worried that we still *also* have to union all uses of
the same operand for DEBUG_INSNs, to avoid compare-debug failures.
Jakub, what do you think?
Ciao!
Steven
More information about the Gcc-patches
mailing list