This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/5] Partial revert of r243782 to restore previous behavior




On 02/07/2017 09:08 AM, Matthew Fortune wrote:
Hi,

This patch partially reverts r243782 where a return false was added
expecting it to be a no-op.  Detailed inspection shows this was not
true.  Despite no bug being identified following the change, removing
the early return is likely to be safer than leaving it in place.

This is supported by the discussion here:
https://gcc.gnu.org/ml/gcc/2017-02/msg00007.html

OK for the trunk. Matt, thank you very much for efforts to clean simplify_operand_subreg up.
gcc/
	* lra-constraints.c (simplify_operand_subreg): Remove early
	return false.
---
  gcc/lra-constraints.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 484a70d..0b7ae34 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -1607,7 +1607,8 @@ simplify_operand_subreg (int nop, machine_mode reg_mode)
  	 the memory.  Typical case is when the index scale should
  	 correspond the memory.  */
        *curr_id->operand_loc[nop] = operand;
-      return false;
+      /* Do not return false here as the MEM_P (reg) will be processed
+	 later in this function.  */
      }
    else if (REG_P (reg) && REGNO (reg) < FIRST_PSEUDO_REGISTER)
      {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]