/* If the field isn't aligned enough to fetch as a memref,
fetch it as a bit field. */
|| (mode1 != BLKmode
- && SLOW_UNALIGNED_ACCESS (mode1, MEM_ALIGN (op))
+ && SLOW_UNALIGNED_ACCESS (mode1, MEM_ALIGN (op0))
&& ((TYPE_ALIGN (TREE_TYPE (tem))
< GET_MODE_ALIGNMENT (mode))
|| (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))
/* If OP0 is not aligned as least as much as the type requires,
we need to make a temporary, copy OP0 to it, and take the
address of the temporary. */
- if (expr_align (TREE_OPERAND (exp, 0)) > MEM_ALIGN (op0))
+ if (GET_MODE (op0) == BLKmode
+ && expr_align (TREE_OPERAND (exp, 0)) > MEM_ALIGN (op0))
{
tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
rtx new