On 7/11/24 7:17 PM, Hans-Peter Nilsson wrote:
CC to both the combine maintainer and the RA maintainer for
verdict on whether this is the true correction or just a
"fix"; whether REG_POINTER must be present or is just an
optimization hint.  And I almost forgot, the late-combine
author!  At least I hope to clarify the commit log based on
your replies.  Please also see PR115883.
REG_POINTER is an optimization hint. If it's on, you know the register points to a real object in memory. In fact, you know that offsetted addresses stay within the same containing object as well (ie, if the base points to an array, offsets will stay in the bounds of the array).

This is important on targets like the PA where segment selection is done from two bits in the base pointer rather than the full effective address. ie, (mem (plus (reg a) (reg b)) is not the same as (mem (plus (reg b) (reg a)).

jeff

Reply via email to