public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Akari Takahashi <akaritakahashioss@gmail.com>
Cc: gcc-patches@gcc.gnu.org, takahashiakari@member.fsf.org
Subject: Re: [PATCH] : [gcc/config/rs600/rs6000.cc][Fix typo] Add parentheses for if statement
Date: Sat, 10 Sep 2022 10:26:17 -0500	[thread overview]
Message-ID: <20220910152617.GU25951@gate.crashing.org> (raw)
In-Reply-To: <CAPzzfcuQcrsYZ+Ag-xfbVCCx2qzSS1hQgrAuWE8zE6vyb9Xayg@mail.gmail.com>

Hi!

Please cc: the rs6000 maintainers on rs6000 patches.

On Thu, Sep 08, 2022 at 08:20:07AM +0900, Akari Takahashi via Gcc-patches wrote:
> --- a/gcc/config/rs6000/rs6000.cc
> +++ b/gcc/config/rs6000/rs6000.cc
> @@ -18114,7 +18114,7 @@ get_memref_parts (rtx mem, rtx *base,
> HOST_WIDE_INT *offset,
>                   HOST_WIDE_INT *size)
>  {
>    rtx addr_rtx;
> -  if (MEM_SIZE_KNOWN_P (mem))
> +  if MEM_SIZE_KNOWN_P (mem)
>      *size = MEM_SIZE (mem);
>    else
>      return false;

This patch is generated backwards.

I committed the following.  Thanks!


Segher


Subject: [PATCH] rs6000: Make an "if" statement more regular

As Akari noticed, we have an unusual "if" statement without parentheses
around the condition.  The condition is a macro that expands to
something with parentheses in the right spot, but, let's make the code a
little less surprising :-)


2022-09-10  Akari Takahashi  <akaritakahashioss@gmail.com>
	    Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.cc (get_memref_parts): Regularize some code.
---
 gcc/config/rs6000/rs6000.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index a656cb32a472..bcf634a146de 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -18114,7 +18114,7 @@ get_memref_parts (rtx mem, rtx *base, HOST_WIDE_INT *offset,
 		  HOST_WIDE_INT *size)
 {
   rtx addr_rtx;
-  if MEM_SIZE_KNOWN_P (mem)
+  if (MEM_SIZE_KNOWN_P (mem))
     *size = MEM_SIZE (mem);
   else
     return false;

  parent reply	other threads:[~2022-09-10 15:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 23:20 Akari Takahashi
2022-09-08 18:53 ` Akari Takahashi
2022-09-10 15:26 ` Segher Boessenkool [this message]
2022-09-10 16:03   ` Akari Takahashi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220910152617.GU25951@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=akaritakahashioss@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=takahashiakari@member.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).