+2018-01-31 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/84123
+ * combine.c (change_zero_ext): Check if hard register satisfies
+ can_change_dest_mode before calling gen_lowpart_SUBREG.
+
2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
PR target/82444
gen_int_shift_amount (inner_mode, start));
else
x = XEXP (x, 0);
+
if (mode != inner_mode)
- x = gen_lowpart_SUBREG (mode, x);
+ {
+ if (HARD_REGISTER_P (x)
+ && !can_change_dest_mode (x, 0, mode))
+ continue;
+
+ x = gen_lowpart_SUBREG (mode, x);
+ }
}
else if (GET_CODE (x) == ZERO_EXTEND
&& GET_CODE (XEXP (x, 0)) == SUBREG
size = GET_MODE_PRECISION (inner_mode);
x = SUBREG_REG (XEXP (x, 0));
if (GET_MODE (x) != mode)
- x = gen_lowpart_SUBREG (mode, x);
+ {
+ if (HARD_REGISTER_P (x)
+ && !can_change_dest_mode (x, 0, mode))
+ continue;
+
+ x = gen_lowpart_SUBREG (mode, x);
+ }
}
else if (GET_CODE (x) == ZERO_EXTEND
&& REG_P (XEXP (x, 0))