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

--- Comment #5 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #4)
> There is code in validate_subreg which is designed to reject some of this
> BUT it looks like misses the issue with big-endian needing a negative offset
> for big-endian which causes the alignment check to be not be good enough:
> 
> ```
>   /* Do not allow normal SUBREG with stricter alignment than the inner MEM.
> 
>      PR120329: Combine can create paradoxical mem subregs even for
>      strict-alignment targets.  Allow it until combine is fixed.  */
>   else if (reg && MEM_P (reg) && STRICT_ALIGNMENT
>            && MEM_ALIGN (reg) < GET_MODE_ALIGNMENT (omode)
>            && known_le (osize, isize))
>     return false;
> ```

Oh wait paradoxical is not included there anyways; so yes this is very much
related to PR120329.  And even if the known_le was removed then it still does
not taken into account Big-endian ...

So this is a big can of worms it seems.

Reply via email to