diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2018-02-08 13:50:16 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-02-08 13:50:16 +0000 |
commit | 98a05c03ef5a3f3f096b1c344e6a75c37fbeea47 (patch) | |
tree | 0f6138e84d1f358923093b678c93c6701a28dcf8 /gcc/lra-constraints.c | |
parent | 24db2556253540529a7b11ed42683b2ea9bb8989 (diff) | |
download | gcc-98a05c03ef5a3f3f096b1c344e6a75c37fbeea47.tar.gz |
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
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r-- | gcc/lra-constraints.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 4f5474ebce1..125bbb6c02b 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -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 |