This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Complex MEM adjust_address instead of subreg (PR middle-end/21742)
>>>>> Richard Henderson writes:
Richard> You shouldn't have had to do this; simplify_gen_subreg is supposed
Richard> to have simplified the subreg of memory into a plain MEM, via
Richard> adjust_address.
Richard> Someone needs to look to see why this isn't working.
simplify_gen_subreg() calls simplify_subreg() for most of the
work, including applying adjust_address() to MEM. That code is protected
by
if (MEM_P (op)
&& ! mode_dependent_address_p (XEXP (op, 0))
&& ...)
The address is
(plus:SI (reg/f:SI 114 virtual-stack-vars)
(const_int 33112 [0x8158]))
The PowerPC port considers all addresses with offsets to be
mode-dependent. The current comment explains this because of Altivec:
"On the RS/6000 this is true of all integral offsets (since AltiVec modes
don't allow them)"
and previously it was because of offsets to multi-word addresses:
"On the RS/6000 this is true if the address is valid with a zero offset
but not with an offset of four (this means it cannot be used as an address
for DImode or DFmode)"
How can the mode-dependent restriction be addressed?
Thanks, David