https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125728
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=120329
--- Comment #4 from Drea Pinski <pinskia at gcc dot gnu.org> ---
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;
```