This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Query with legitimate_constant_p


> Date: Tue, 12 Feb 2002 17:13:50 +0000
> From: Dan Towner <dant@picochip.com>

> Nick Ing-Simmons wrote:
> > 
> > Dan Towner <dant@picochip.com> 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 <geoffk@geoffk.org> <geoffk@redhat.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]