+2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * lra-constraints.c (match_reload): Use subreg_lowpart_offset
+ rather than 0 when creating partial subregs.
+
2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
* vec-perm-indices.c (vec_perm_indices::series_p): Give examples
if (SCALAR_INT_MODE_P (inmode))
new_out_reg = gen_lowpart_SUBREG (outmode, reg);
else
- new_out_reg = gen_rtx_SUBREG (outmode, reg, 0);
+ {
+ poly_uint64 offset = subreg_lowpart_offset (outmode, inmode);
+ new_out_reg = gen_rtx_SUBREG (outmode, reg, offset);
+ }
LRA_SUBREG_P (new_out_reg) = 1;
/* If the input reg is dying here, we can use the same hard
register for REG and IN_RTX. We do it only for original
if (SCALAR_INT_MODE_P (outmode))
new_in_reg = gen_lowpart_SUBREG (inmode, reg);
else
- new_in_reg = gen_rtx_SUBREG (inmode, reg, 0);
+ {
+ poly_uint64 offset = subreg_lowpart_offset (inmode, outmode);
+ new_in_reg = gen_rtx_SUBREG (inmode, reg, offset);
+ }
/* NEW_IN_REG is non-paradoxical subreg. We don't want
NEW_OUT_REG living above. We add clobber clause for
this. This is just a temporary clobber. We can remove