public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Peter Bergner <bergner@linux.ibm.com>
To: P Jeevitha <jeevitha@linux.vnet.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Segher Boessenkool <segher@kernel.crashing.org>
Subject: Re: [PATCH] rs6000: Change bitwise xor to inequality operator [PR106907]
Date: Thu, 15 Jun 2023 23:25:26 -0500	[thread overview]
Message-ID: <4586392d-ff8b-1c19-4af0-2a816fa63259@linux.ibm.com> (raw)
In-Reply-To: <a09039c6-3535-c7c9-8755-acaaabc1278a@linux.vnet.ibm.com>

On 6/12/23 6:18 AM, P Jeevitha wrote:
> Bitwise xor performed on bool
> is similar to checking inequality. So changed to inequality
> operator (!=) instead of bitwise xor (^).
[snip'
> -	  if (swapped ^ !BYTES_BIG_ENDIAN
[snip]
> +	  if (swapped != !BYTES_BIG_ENDIAN

I know Andreas mentioned using "swapped != !BYTES_BIG_ENDIAN" in
the bugzilla, but that's the same as "swapped == BYTES_BIG_ENDIAN",
and it doesn't contain a double-negative and seems a little clearer.

It's up to Segher though...and if we go with this, then the ChangeLog
entry needs to be updated slightly since we're no longer testing for
inequality.

Peter


  reply	other threads:[~2023-06-16  4:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d8e78d8a-b0fc-cb05-04f6-acacb6d83869@linux.vnet.ibm.com>
2023-06-12 11:18 ` P Jeevitha
2023-06-16  4:25   ` Peter Bergner [this message]
2023-10-08 18:09     ` [PING^1][PATCH] " jeevitha

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=4586392d-ff8b-1c19-4af0-2a816fa63259@linux.ibm.com \
    --to=bergner@linux.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeevitha@linux.vnet.ibm.com \
    --cc=segher@kernel.crashing.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).