public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/101955] New: (signed<<31)>>31 should become -(signed&1)
@ 2021-08-18  5:47 pinskia at gcc dot gnu.org
  2021-08-18  5:48 ` [Bug middle-end/101955] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-18  5:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101955
           Summary: (signed<<31)>>31 should become -(signed&1)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
int f(int b)
{
    return (((b)<<31)>>31);
}
int f1(int b)
{
    return -(b&1);
}
These two should produce the same code.

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

end of thread, other threads:[~2023-10-30 16:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18  5:47 [Bug middle-end/101955] New: (signed<<31)>>31 should become -(signed&1) pinskia at gcc dot gnu.org
2021-08-18  5:48 ` [Bug middle-end/101955] " pinskia at gcc dot gnu.org
2021-08-18  6:49 ` rguenth at gcc dot gnu.org
2021-08-18 15:51 ` schwab@linux-m68k.org
2021-08-18 17:51 ` pinskia at gcc dot gnu.org
2021-08-18 19:22 ` jakub at gcc dot gnu.org
2021-11-11  0:21 ` navidrahimi at microsoft dot com
2023-08-04  7:10 ` cvs-commit at gcc dot gnu.org
2023-10-11  7:09 ` cvs-commit at gcc dot gnu.org
2023-10-20 23:08 ` cvs-commit at gcc dot gnu.org
2023-10-30 16:23 ` cvs-commit at gcc dot gnu.org

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