+2018-04-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/85414
+ * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
+ case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
+ gen_lowpart_no_emit.
+
2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
PR target/85473
&& (GET_MODE_PRECISION (subreg_promoted_mode (from))
>= GET_MODE_PRECISION (to_int_mode))
&& SUBREG_CHECK_PROMOTED_SIGN (from, unsignedp))
- from = gen_lowpart (to_int_mode, from), from_mode = to_int_mode;
+ {
+ from = gen_lowpart (to_int_mode, SUBREG_REG (from));
+ from_mode = to_int_mode;
+ }
gcc_assert (GET_CODE (to) != SUBREG || !SUBREG_PROMOTED_VAR_P (to));
&& SUBREG_PROMOTED_SIGNED_P (op)
&& !paradoxical_subreg_p (mode, GET_MODE (SUBREG_REG (op))))
{
- temp = rtl_hooks.gen_lowpart_no_emit (mode, op);
+ temp = rtl_hooks.gen_lowpart_no_emit (mode, SUBREG_REG (op));
if (temp)
return temp;
}
&& SUBREG_PROMOTED_UNSIGNED_P (op)
&& !paradoxical_subreg_p (mode, GET_MODE (SUBREG_REG (op))))
{
- temp = rtl_hooks.gen_lowpart_no_emit (mode, op);
+ temp = rtl_hooks.gen_lowpart_no_emit (mode, SUBREG_REG (op));
if (temp)
return temp;
}