public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 4/5] Partial revert of r243782 to restore previous behavior
@ 2017-02-07 14:09 Matthew Fortune
  2017-02-07 22:07 ` Vladimir Makarov
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Fortune @ 2017-02-07 14:09 UTC (permalink / raw)
  To: 'gcc-patches@gcc.gnu.org' (gcc-patches@gcc.gnu.org)
  Cc: Vladimir Makarov, Eric Botcazou (ebotcazou@adacore.com),
	Robert Suchanek, Moore, Catherine (Catherine_Moore@mentor.com)

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

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 4/5] Partial revert of r243782 to restore previous behavior
  2017-02-07 14:09 [PATCH 4/5] Partial revert of r243782 to restore previous behavior Matthew Fortune
@ 2017-02-07 22:07 ` Vladimir Makarov
  2017-02-20 12:12   ` Matthew Fortune
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Makarov @ 2017-02-07 22:07 UTC (permalink / raw)
  To: Matthew Fortune,
	'gcc-patches@gcc.gnu.org' (gcc-patches@gcc.gnu.org)
  Cc: Eric Botcazou (ebotcazou@adacore.com),
	Robert Suchanek, Moore, Catherine (Catherine_Moore@mentor.com)



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH 4/5] Partial revert of r243782 to restore previous behavior
  2017-02-07 22:07 ` Vladimir Makarov
@ 2017-02-20 12:12   ` Matthew Fortune
  0 siblings, 0 replies; 3+ messages in thread
From: Matthew Fortune @ 2017-02-20 12:12 UTC (permalink / raw)
  To: Vladimir Makarov,
	'gcc-patches@gcc.gnu.org' (gcc-patches@gcc.gnu.org)
  Cc: Eric Botcazou (ebotcazou@adacore.com),
	Robert Suchanek, Moore, Catherine (Catherine_Moore@mentor.com)

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-20 12:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07 14:09 [PATCH 4/5] Partial revert of r243782 to restore previous behavior Matthew Fortune
2017-02-07 22:07 ` Vladimir Makarov
2017-02-20 12:12   ` Matthew Fortune

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).