Commit 98a05c03 by Richard Sandiford Committed by Richard Sandiford

Simplify LRA lowpart subreg fix

r257177 made the else arms equivalent to the if arms.

2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
	* lra-constraints.c (match_reload): Unconditionally use
	gen_lowpart_SUBREG, rather than selecting between that
	and equivalent gen_rtx_SUBREG code.

From-SVN: r257488
parent 24db2556
2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
* lra-constraints.c (match_reload): Unconditionally use
gen_lowpart_SUBREG, rather than selecting between that
and equivalent gen_rtx_SUBREG code.
2018-02-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/84233
......
......@@ -942,13 +942,7 @@ match_reload (signed char out, signed char *ins, signed char *outs,
reg = new_in_reg
= lra_create_new_reg_with_unique_value (inmode, in_rtx,
goal_class, "");
if (SCALAR_INT_MODE_P (inmode))
new_out_reg = gen_lowpart_SUBREG (outmode, reg);
else
{
poly_uint64 offset = subreg_lowpart_offset (outmode, inmode);
new_out_reg = gen_rtx_SUBREG (outmode, reg, offset);
}
new_out_reg = gen_lowpart_SUBREG (outmode, reg);
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
......@@ -965,13 +959,7 @@ match_reload (signed char out, signed char *ins, signed char *outs,
reg = new_out_reg
= lra_create_new_reg_with_unique_value (outmode, out_rtx,
goal_class, "");
if (SCALAR_INT_MODE_P (outmode))
new_in_reg = gen_lowpart_SUBREG (inmode, reg);
else
{
poly_uint64 offset = subreg_lowpart_offset (inmode, outmode);
new_in_reg = gen_rtx_SUBREG (inmode, reg, offset);
}
new_in_reg = gen_lowpart_SUBREG (inmode, reg);
/* 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment