Simplify LRA lowpart subreg fix
authorRichard Sandiford <richard.sandiford@linaro.org>
Thu, 8 Feb 2018 13:50:16 +0000 (13:50 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 8 Feb 2018 13:50:16 +0000 (13:50 +0000)
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

gcc/ChangeLog
gcc/lra-constraints.c

index f26472ada037d335d48ed7c42a863844f6c30be3..803e0305c2a9f8ea4605ec6033559251ce659f92 100644 (file)
@@ -1,3 +1,9 @@
+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
index 4f5474ebce17d3ec3086d7c0aef005c70fe34687..125bbb6c02b6a809370231aa6d78a7d459316f1a 100644 (file)
@@ -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