https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92308

--- Comment #6 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to rguent...@suse.de from comment #5)
> On Mon, 4 Nov 2019, rearnsha at gcc dot gnu.org wrote:

> I suspect TARGET_LEGITIMIZE_ADDRESS is only applied during
> reload/LRA, correct?

No, it's called during expand if the address isn't valid.  But it's called in
isolation with no information about what other addresses might be generated, so
forming bases is guesswork based purely on heuristics.

There's a similar hook in LRA (TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT), but it
has the same basic problem that the B/E doesn't know what other values might
need legitimizing.

Reply via email to