Use partial_subreg_p in curr_insn_transform
authorRichard Sandiford <richard.sandiford@linaro.org>
Wed, 3 Jan 2018 21:39:58 +0000 (21:39 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 3 Jan 2018 21:39:58 +0000 (21:39 +0000)
Use partial_subreg_p in code that was added since the initial patch
that introduced this function.

2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* lra-constraints.c (curr_insn_transform): Use partial_subreg_p.

From-SVN: r256194

gcc/ChangeLog
gcc/lra-constraints.c

index 4e5a8fa76b27ad88bac1e8c1074a795aeb9eb10c..560825346f232d44a322d1558a6adce58c0fd079 100644 (file)
@@ -1,3 +1,7 @@
+2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
+
+       * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
+
 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
            Alan Hayward  <alan.hayward@arm.com>
            David Sherwood  <david.sherwood@arm.com>
index 3dcb576e7e13a769411c876f452f4ef760085c40..0d63442585746c0683bd6d320ecaad9972375469 100644 (file)
@@ -4243,8 +4243,7 @@ curr_insn_transform (bool check_only_p)
                              || (simplify_subreg_regno
                                  (ira_class_hard_regs[goal_alt[i]][0],
                                   GET_MODE (reg), byte, mode) >= 0)))
-                     || (GET_MODE_PRECISION (mode)
-                         < GET_MODE_PRECISION (GET_MODE (reg))
+                     || (partial_subreg_p (mode, GET_MODE (reg))
                          && GET_MODE_SIZE (GET_MODE (reg)) <= UNITS_PER_WORD
                          && WORD_REGISTER_OPERATIONS)))
                {