On Tue, 2020-04-28 at 20:03 -0500, Segher Boessenkool wrote:
> Hi!
> 
> On Tue, Apr 28, 2020 at 08:38:56AM +0100, Richard Sandiford wrote:
> > Also, the (const:P ...) ought to be there even outside of a MEM.  E.g. we
> > ought to have:
> > 
> >   (set (reg X) (const:P (plus:P (symbol_ref:P S) (const_int D))))
> > 
> > rather than:
> > 
> >   (set (reg X) (plus:P (symbol_ref:P S) (const_int D)))
> 
> What are the actual rules?  Where is this documented?
> 
> Of course it is highly desirable to have CONST around such constant
> addresses, but when is it *required*?  And what *is* a constant address
> (in this context)?
I don't know if it's documented, but it's been expected practice for decades.

It includes symbolic constants, and the results of simple arithmetic on symbolic
constants.  It (to the best of my knowledge) does not include logical operations
on symbolic constants.

Jeff

Reply via email to