public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/33512] New: Simple bitwise simplification missed Date: Thu, 20 Sep 2007 22:32:00 -0000 [thread overview] Message-ID: <bug-33512-6528@http.gcc.gnu.org/bugzilla/> (raw) These two functions should produce the same code: int f(int y, int x) { return x & ((~x) | y); } int g(int y, int x) { return y & x; } x & ((~x) | y) is the same as (x & ~x) | (x & y) using distribution and that becomes (x & y) because (x & ~x) is always 0 and 0 | x is x. This should be done at both the tree level and the RTL level. -- Summary: Simple bitwise simplification missed Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33512
next reply other threads:[~2007-09-20 22:32 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-09-20 22:32 pinskia at gcc dot gnu dot org [this message] 2007-09-20 22:36 ` [Bug rtl-optimization/33512] " pinskia at gcc dot gnu dot org 2007-10-02 18:44 ` pinskia at gcc dot gnu dot org 2008-02-23 18:00 ` pinskia at gcc dot gnu dot org 2008-02-23 18:02 ` [Bug tree-optimization/33512] " pinskia at gcc dot gnu dot org 2008-04-04 21:20 ` janis at gcc dot gnu dot org 2008-04-04 21:22 ` pinskia at gcc dot gnu dot org 2008-07-15 14:54 ` pinskia at gcc dot gnu dot org 2008-11-23 18:46 ` pinskia at gcc dot gnu dot org 2010-07-02 19:52 ` bergner at gcc dot gnu dot 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-33512-6528@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: linkBe 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).