Applied to master as c37b65b3348d, thanks!
--Philipp.

On Tue, 10 Mar 2026 at 15:07, Jeffrey Law <[email protected]>
wrote:

>
>
> On 2/26/2026 11:31 AM, Philipp Tomsich wrote:
> > The validity check in do_check_validity was passing the address mode
> > (GET_MODE of the address RTX, e.g. DImode) to memory_address_addr_space_p
> > instead of the memory access mode (GET_MODE of the MEM RTX, e.g. SImode).
> > The first argument to memory_address_addr_space_p is the mode of the
> > memory access, not the address mode.
> >
> > On targets where address validity depends on the access width (e.g.
> > alignment-sensitive modes, vector modes), this could accept an illegal
> > offset or reject a valid one.
> >
> > Rename the variable to 'addr_mode' for address construction and add a
> > separate 'mem_mode' for the validity check.
> >
> > gcc/ChangeLog:
> >
> >       * fold-mem-offsets.cc (do_check_validity): fix wrong mode
> >       and rename arguments to avoid future confusion
> OK
> jeff
>

Reply via email to