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 tree-optimization/33512] Simple bitwise simplification missed
Date: Tue, 24 Apr 2012 08:24:00 -0000	[thread overview]
Message-ID: <bug-33512-4-QqVjQ2MffL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-33512-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33512

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-04-24 08:19:59 UTC ---
Patch which I am testing:
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c    (revision 186755)
+++ tree-ssa-forwprop.c    (working copy)
@@ -1913,10 +1913,10 @@ simplify_bitwise_binary (gimple_stmt_ite
    /* Simplify (A & B) OP0 (C & B) to (A OP0 C) & B. */
    if (def1_code == def2_code
        && def1_code == BIT_AND_EXPR
-       && operand_equal_for_phi_arg_p (gimple_assign_rhs2 (def1),
-                       gimple_assign_rhs2 (def2)))
+       && operand_equal_for_phi_arg_p (def1_arg2,
+                       def2_arg2))
     {
-      tree b = gimple_assign_rhs2 (def1);
+      tree b = def1_arg2;
       tree a = def1_arg1;
       tree c = def2_arg1;
       tree inner = fold_build2 (code, TREE_TYPE (arg2), a, c);

--- CUT ---
This was definitely my fault.  I tested both patches independently and forgot
to test them together.  Sorry about that.


  parent reply	other threads:[~2012-04-24  8:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-33512-4@http.gcc.gnu.org/bugzilla/>
2012-04-24  7:06 ` pinskia at gcc dot gnu.org
2012-04-24  7:07 ` pinskia at gcc dot gnu.org
2012-04-24  7:39 ` ktietz at gcc dot gnu.org
2012-04-24  8:24 ` pinskia at gcc dot gnu.org [this message]
2012-04-24  8:31 ` ktietz at gcc dot gnu.org
2012-04-24  8:38 ` pinskia at gcc dot gnu.org
2012-04-24  8:57 ` pinskia at gcc dot gnu.org
2007-09-20 22:32 [Bug rtl-optimization/33512] New: " 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-4-QqVjQ2MffL@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).