This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Useless patterns in alpha.md
On Sun, Nov 28, 1999 at 05:48:21AM -0700, Jeffrey A Law wrote:
> What about the use of addition_operation in alpha.md? Presumably it
> is not a problem because it only allows (plus (reg) (const_int)) and
> it uses 'p' which triggers the find_reloads_address stuff?
Actually, addition_operation exists _specifically_ to
match plus, so that Bernd's register elimination will
optimize it.
(Hrrm.. I was trying to find the reference to the mail
the patch went out in, as I remember commenting on the
fact that this shouldn't be necessary. But I couldn't
find it.)
Anyway, my opinion is that the register elimination should
be tweeked to look for
(plus (reg fp) (const_int 32))
eliminating to
(plus (plus (reg sp) (const_int 20)) (const_int 32))
and folding that as appropriate. We can check that the op1
arm of the original plus is also an operand Just In Case.
Bernd, I think your patch is ok. I kept meaning to do
this myself but kept finding something else to do.
r~