public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/37516] ~(-2 - a) is not being optimized into a + 1
Date: Thu, 23 Feb 2012 09:17:00 -0000	[thread overview]
Message-ID: <bug-37516-4-5b4LuU5Dmj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-37516-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> 2012-02-23 08:47:55 UTC ---
On Thu, 23 Feb 2012, pinskia at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37516
> 
> Andrew Pinski <pinskia at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |ASSIGNED
>    Last reconfirmed|                            |2012-02-23
>          AssignedTo|unassigned at gcc dot       |pinskia at gcc dot gnu.org
>                    |gnu.org                     |
>      Ever Confirmed|0                           |1
> 
> --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-23 08:42:01 UTC ---
> I have an idea on how to fix this.
> basically:
> ~(C - X)
> is the same as:
> ~ - (X - C)
> which then can be simplified to
> X - (C+1)
> 
> This should be done on both the tree level (on the pinskia/treecombine branch
> in tree-ssa-fold.c) and the rtl level in simplify-rtx.c.

Maybe get away with these old-stylish names ('tree' and 'fold') and
make it match reality, gimple-ssa-combine.c ;)

Still have to have a look at your branch - do you have a brief
overview documentation, for example on the wiki?  What I'd like
to do is have an interface that I can re-use for VN combining,
basically replace its simplify_*_expression functions.

Richard.


  parent reply	other threads:[~2012-02-23  8:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-37516-4@http.gcc.gnu.org/bugzilla/>
2012-02-23  8:48 ` pinskia at gcc dot gnu.org
2012-02-23  9:17 ` rguenther at suse dot de [this message]
2012-02-23 22:16 ` pinskia at gcc dot gnu.org
2012-02-24  9:03 ` rguenther at suse dot de
2012-02-26  1:43 ` pinskia at gcc dot gnu.org
2021-08-03 23:03 ` pinskia at gcc dot gnu.org
2008-09-14  3:37 [Bug rtl-optimization/37516] New: " pinskia at gcc dot gnu dot org
2008-09-14  3:37 ` [Bug rtl-optimization/37516] " pinskia at gcc dot gnu dot org
2008-09-14  4:57 ` pinskia 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-37516-4-5b4LuU5Dmj@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).