[PATCH] Remove MISALIGNED_INDIRECT_REF
Michael Matz
matz@suse.de
Thu Sep 30 16:38:00 GMT 2010
Hi,
On Thu, 30 Sep 2010, Richard Guenther wrote:
> Yes, I noticed the above, too, and it is that way since forever.
>
> The problem is that MEM_ALIGN defaults to mode-alignment only on
> strict-alignment targets. Something that can't be right,
I think it is right. The reasoning goes like so: On a strict-alignment
target, when we see a MEM access, we know that it must obey the alignment
requirements of the hardware, therefore MEMs that were generated correctly
must have mode-compatible alignment. Otherwise they shouldn't have been
generated in the first place. Which means the bug lies in generating
those MEMs in the first place.
Another source of confusion always is if MEM_ALIGN is meant as an
optimization hint or a correctness measure. The latter implies that it
must be correctly maintained in all transformations (and generated
correctly from the beginning of course). The implementation of
MEM_ALIGN suggests that it's intended as correctness measure.
> or at least it has very odd consequences.
That for sure.
Ciao,
Micha.
More information about the Gcc-patches
mailing list