/* References of size POLY_INT_CST to a fixed-size object must go
through memory. It's more efficient to force that here than
to create temporary slots on the fly.
- RTL expansion expectes TARGET_MEM_REF to always address actual memory. */
+ RTL expansion expectes TARGET_MEM_REF to always address actual memory.
+ Also, force to stack non-BLKmode vars accessed through VIEW_CONVERT_EXPR
+ to BLKmode type. */
else if (TREE_CODE (t) == TARGET_MEM_REF
|| (TREE_CODE (t) == MEM_REF
&& TYPE_SIZE (TREE_TYPE (t))
- && POLY_INT_CST_P (TYPE_SIZE (TREE_TYPE (t)))))
+ && POLY_INT_CST_P (TYPE_SIZE (TREE_TYPE (t))))
+ || (TREE_CODE (t) == VIEW_CONVERT_EXPR
+ && TYPE_MODE (TREE_TYPE (t)) == BLKmode))
{
tree base = get_base_address (t);
if (base
/* If the input and output modes are both the same, we are done. */
if (mode == GET_MODE (op0))
;
+ /* Similarly if the output mode is BLKmode and input is a MEM,
+ adjust_address done below is all we need. */
+ else if (mode == BLKmode && MEM_P (op0))
+ ;
/* If neither mode is BLKmode, and both modes are the same size
then we can use gen_lowpart. */
else if (mode != BLKmode