This is the mail archive of the
mailing list for the GCC project.
Re: Query with legitimate_constant_p
> Date: Tue, 12 Feb 2002 17:13:50 +0000
> From: Dan Towner <email@example.com>
> Nick Ing-Simmons wrote:
> > Dan Towner <firstname.lastname@example.org> writes:
> > >Because the symbol_ref is a valid constant, gcc propagates the constant
> > >into the memory load:
> > >
> > > reg1 := mem(symbol_ref("s") + 2)
> > It won't do that if you deny that it is a LEGITIMATE_ADDRESS
> I deny that any symbol_ref is a legitimate address, but constant
> propagation still puts the symbol ref into the memory operation.
Do you also reject '(const (plus (symbol_ref ...) (const_int ...)))'?
- Geoffrey Keating <email@example.com> <firstname.lastname@example.org>