diff options
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -9381,7 +9381,15 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, { if (GET_CODE (op0) == SUBREG) op0 = force_reg (GET_MODE (op0), op0); - op0 = gen_lowpart (mode, op0); + temp = gen_lowpart_common (mode, op0); + if (temp) + op0 = temp; + else + { + if (!REG_P (op0) && !MEM_P (op0)) + op0 = force_reg (GET_MODE (op0), op0); + op0 = gen_lowpart (mode, op0); + } } /* If both types are integral, convert from one mode to the other. */ else if (INTEGRAL_TYPE_P (type) && INTEGRAL_TYPE_P (TREE_TYPE (treeop0))) |