public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/54571] Missed optimization converting between bit sets
Date: Mon, 15 Nov 2021 00:52:27 +0000	[thread overview]
Message-ID: <bug-54571-4-1SIxLwbMwQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54571-4@http.gcc.gnu.org/bugzilla/>

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
         Depends on|                            |103216

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is fixed mostly by the patch which fixes PR 103216.
We still have stuff like:
  _1 = x_3(D) & 1;
  _7 = _1 != 0;
  _8 = (int) _7;
  _9 = y_4(D) | _8;

and:
  _1 = x_3(D) & 2;
  _7 = _1 != 0;
  _8 = (int) _7;
  _9 = y_4(D) | _8;

and
   _1 = x_3(D) & 2;
  _7 = _1 != 0;
  _8 = (int) _7;
  _9 = _8 << 1;
  _10 = y_4(D) | _9;

Which we produce things like:
        xorl    %eax, %eax
        andl    $2, %edi
        sete    %al
        orl     %esi, %eax

Where the sete/xor could be reproduced with shift for an example.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103216
[Bug 103216] missed optimization, phiopt/vrp?

  parent reply	other threads:[~2021-11-15  0:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13 21:25 [Bug middle-end/54571] New: " rth at gcc dot gnu.org
2012-09-13 21:25 ` [Bug middle-end/54571] " rth at gcc dot gnu.org
2012-09-14  8:40 ` rguenth at gcc dot gnu.org
2021-07-06  8:39 ` pinskia at gcc dot gnu.org
2021-07-20  3:16 ` pinskia at gcc dot gnu.org
2021-11-15  0:52 ` pinskia at gcc dot gnu.org [this message]
2023-06-07 15:20 ` pinskia 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-54571-4-1SIxLwbMwQ@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).