public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "segher at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/82940] Suboptimal code for (a & 0x7f) | (b & 0x80) on powerpc
Date: Mon, 23 Aug 2021 15:45:40 +0000	[thread overview]
Message-ID: <bug-82940-4-bVRUKW1Pwr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-82940-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82940

--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #7)
> (In reply to Peter Cordes from comment #6)
> > # power64 GCC 9.2.1 (ATI13.0)
> >         rlwimi 3,4,0,255    # bit-blend according to mask, rotate count=0
> >         rldicl 3,3,0,32     # Is this zero-extension to 64-bit redundant?
> 
> It is: the rlwinm does an AND with 0xff already, so that clears the top 32
> bits for sure.

Wow I cannot read, it is an rlwimi, so scratch that.

The rlwimi here keeps the top 56 bits intact, and they already were 0, so the
insn still is redundant.

  parent reply	other threads:[~2021-08-23 15:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-82940-4@http.gcc.gnu.org/bugzilla/>
2021-08-01  7:16 ` pinskia at gcc dot gnu.org
2021-08-01  9:57 ` segher at gcc dot gnu.org
2021-08-22 22:16 ` peter at cordes dot ca
2021-08-23 15:40 ` segher at gcc dot gnu.org
2021-08-23 15:45 ` segher at gcc dot gnu.org [this message]
2023-04-11 17:05 ` aagarwa at gcc dot gnu.org

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=bug-82940-4-bVRUKW1Pwr@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).