From: Jeff Law <law@redhat.com>
To: Marc Glisse <marc.glisse@inria.fr>, "H.J. Lu" <hjl.tools@gmail.com>
Cc: Richard Biener <richard.guenther@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Simple bitop reassoc in match.pd
Date: Wed, 11 May 2016 16:26:00 -0000 [thread overview]
Message-ID: <cad81ded-1af0-4ce9-729e-8806b54346ac@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1605111741330.16195@laptop-mg.saclay.inria.fr>
On 05/11/2016 10:17 AM, Marc Glisse wrote:
> The transformation seems right to me, but we are then missing another
> transformation like ~X & Y -> X ^ Y when we know that X & ~Y is 0 (the 1
> bits of X are included in those of Y). That may not be easy with the
> limited bit tracking we have. A version limited to constant Y of the
> form 2^n-1 (i.e. 0...01...1) where X has a range included in [0, Y] may
> be simpler.
While we don't have strong bit tracking, we do track [0..1] ranges
reasonably well, so it may be worth doing.
> We could also simplify (int)(_Bool)x to x using VRP information that x
> is in [0, 1], but apparently when VRP replaces x==0 with y=x^1,(_Bool)y,
> it does not compute a range for the new variable y, and by the time the
> next VRP pass comes, it is too late.
Seems like a clear oversight.
jeff
next prev parent reply other threads:[~2016-05-11 16:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-30 18:45 Canonicalize X u< X to UNORDERED_EXPR Marc Glisse
2016-05-02 8:37 ` Richard Biener
2016-05-02 9:19 ` Marc Glisse
2016-05-02 9:45 ` Richard Biener
2016-05-03 6:37 ` Marc Glisse
2016-05-03 11:03 ` Richard Biener
2016-05-03 13:27 ` Marc Glisse
2016-05-03 13:34 ` Richard Biener
2016-05-06 11:50 ` Simple bitop reassoc in match.pd (was: Canonicalize X u< X to UNORDERED_EXPR) Marc Glisse
2016-05-08 20:49 ` Marc Glisse
2016-05-09 10:04 ` Richard Biener
2016-05-10 6:12 ` Marc Glisse
2016-05-10 9:27 ` Richard Biener
2016-05-11 13:52 ` H.J. Lu
2016-05-11 16:17 ` Marc Glisse
2016-05-11 16:26 ` Jeff Law [this message]
2016-05-11 17:56 ` Simple bitop reassoc in match.pd Marc Glisse
2016-05-11 20:44 ` Marc Glisse
2016-05-12 8:41 ` Richard Biener
2016-05-12 16:03 ` Marc Glisse
2016-05-12 16:51 ` Richard Biener
2016-05-12 5:26 ` Marc Glisse
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=cad81ded-1af0-4ce9-729e-8806b54346ac@redhat.com \
--to=law@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=marc.glisse@inria.fr \
--cc=richard.guenther@gmail.com \
/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).