===================================================================
@@ -4654,7 +4654,8 @@ other fields in the same word of the str
Define this macro to be the value 1 if memory accesses described by the
@var{mode} and @var{alignment} parameters have a cost many times greater
than aligned accesses, for example if they are emulated in a trap
-handler.
+handler. This macro is invoked only for unaligned accesses, i.e. when
+@code{@var{alignment} < GET_MODE_ALIGNMENT (@var{mode})}.
When this macro is nonzero, the compiler will act as if
@code{STRICT_ALIGNMENT} were nonzero when generating code for block
===================================================================
@@ -1486,9 +1486,10 @@ simplify_operand_subreg (int nop, machin
equivalences in function lra_constraints) and because for spilled
pseudos we allocate stack memory enough for the biggest
corresponding paradoxical subreg. */
- if (!SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (reg))
- || SLOW_UNALIGNED_ACCESS (innermode, MEM_ALIGN (reg))
- || MEM_ALIGN (reg) >= GET_MODE_ALIGNMENT (mode))
+ if (!(MEM_ALIGN (reg) < GET_MODE_ALIGNMENT (mode)
+ && SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (reg)))
+ || (MEM_ALIGN (reg) < GET_MODE_ALIGNMENT (innermode)
+ && SLOW_UNALIGNED_ACCESS (innermode, MEM_ALIGN (reg))))
return true;
/* INNERMODE is fast, MODE slow. Reload the mem in INNERMODE. */