diff mbox

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

Message ID 6D39441BF12EF246A7ABCE6654B0235380B5CE93@hhmail02.hh.imgtec.org
State New
Headers show

Commit Message

Matthew Fortune Feb. 7, 2017, 2:08 p.m. UTC
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

Thanks,
Matthew

gcc/
	* lra-constraints.c (simplify_operand_subreg): Remove early
	return false.
---
 gcc/lra-constraints.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Vladimir Makarov Feb. 7, 2017, 10:07 p.m. UTC | #1
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)
>       {
Matthew Fortune Feb. 20, 2017, 12:10 p.m. UTC | #2
Vladimir Makarov <vmakarov@redhat.com> writes:
> 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.

Committed as r245600.

Thanks,
Matthew
diff mbox

Patch

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)
     {