http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58041

--- Comment #23 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
(In reply to Eric Botcazou from comment #22)
> We should be very wary of generating unaligned accesses during optimization
> for targets that define SLOW_UNALIGNED_ACCESS.  And note that most
> architectures supported by GCC are STRICT_ALIGNMENT, not the other way
> around, so it's the common case.

I fully agree.  In this case, we aren't introducing new unaligned accesses, but
simply restructuring the address that points to the same (unaligned) location. 
The restructuring allows us to common the base addressing for related array
elements in the same misaligned structure, which will produce slightly better
code with the same number of unaligned accesses.  Martin's patch just makes
sure the necessary alignment is recorded on the restructured memory reference,
so the back ends can do their usual tricks to copy misaligned references in
parts, etc.

Reply via email to