aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2018-01-03 21:39:58 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-01-03 21:39:58 +0000
commite5f83886b05c22f4bc221dac05e64b54ef7eece4 (patch)
treeea270e467bc5817b7ee37c0bb63c0a7bd4f5dc48
parentb660eccf9b32ee3b962a77cf5565fa2771792c35 (diff)
downloadgcc-e5f83886b05c22f4bc221dac05e64b54ef7eece4.zip
gcc-e5f83886b05c22f4bc221dac05e64b54ef7eece4.tar.gz
gcc-e5f83886b05c22f4bc221dac05e64b54ef7eece4.tar.bz2
Use partial_subreg_p in curr_insn_transform
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
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/lra-constraints.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4e5a8fa..5608253 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,8 @@
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>
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 3dcb576e..0d63442 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -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)))
{