http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57915

Vladimir Makarov <vmakarov at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at redhat dot com

--- Comment #4 from Vladimir Makarov <vmakarov at redhat dot com> ---
The address in question is

(plus (symbol_ref ...) (const_int 4))

LRA finds two displacements (symbol_ref and const_int) although only one
displacement is allowed.

The correct canonical address should be:

(const (plus (symbol_ref ...) (const_int 4)))

Non-canonical address is created from

(reg ...)

by 1st constant propagation pass (cprop1).

I believe the problem should be fixed there.

As for reload pass, it has code transforming address (plus some const some
const) into (const (plus some const some const)).  It was probably a problem
fix in a wrong place.  There is no need to complicate LRA more and implement
analogous code in LRA.  As I wrote I believe it should be fixed in cprop1 by
generating the correct canonical address.

Reply via email to