This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Use partial_subreg_p in curr_insn_transform
- From: Richard Sandiford <richard dot sandiford at linaro dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 03 Jan 2018 21:41:31 +0000
- Subject: [committed] Use partial_subreg_p in curr_insn_transform
- Authentication-results: sourceware.org; auth=none
Use partial_subreg_p in code that was added since the initial patch
that introduced this function.
Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu.
Also tested by comparing the before and after assembly output for at
least one target per CPU directory. Committed as obvious.
Richard
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
Index: gcc/lra-constraints.c
===================================================================
--- gcc/lra-constraints.c 2018-01-03 07:18:30.797822724 +0000
+++ gcc/lra-constraints.c 2018-01-03 09:34:11.747070247 +0000
@@ -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)))
{