From: Richard Biener <rguenther@suse.de>
To: Marc Glisse <marc.glisse@inria.fr>
Cc: Richard Biener <richard.guenther@gmail.com>,
Marek Polacek <polacek@redhat.com>,
Jakub Jelinek <jakub@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Optimize (CST1 << A) == CST2 (PR tree-optimization/66299)
Date: Tue, 09 Jun 2015 11:57:00 -0000 [thread overview]
Message-ID: <alpine.LSU.2.11.1506091348160.30088@zhemvz.fhfr.qr> (raw)
In-Reply-To: <alpine.LSU.2.11.1506091347300.30088@zhemvz.fhfr.qr>
On Tue, 9 Jun 2015, Richard Biener wrote:
> On Tue, 9 Jun 2015, Marc Glisse wrote:
>
> > On Tue, 9 Jun 2015, Richard Biener wrote:
> >
> > > > Tweaking it so that (6<<X)==0 becomes X>=31 for TYPE_OVERFLOW_WRAPS and
> > > > false for TYPE_OVERFLOW_UNDEFINED is probably more controversial.
> > >
> > > Hm, yes. I think signed overflow != shift amount overflow, so testing the
> > > overflow macros for this isn't valid.
> >
> > Would it be ok to always turn it to X>=31 then? (the value 31 is conveniently
> > already computed in 'cand')
>
> I think so.
Or even ((unsigned)X - 31) < 1 (I probably got that wrong) to properly
say X>=29 && X<32, that is, preserve the implicit upper bound on X
we have because it is used in a shift.
Richard.
> Richard.
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nuernberg)
next prev parent reply other threads:[~2015-06-09 11:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 12:33 Marek Polacek
2015-05-28 13:10 ` Jakub Jelinek
2015-05-28 20:33 ` Marc Glisse
2015-06-08 15:12 ` Marek Polacek
2015-06-08 17:14 ` Marc Glisse
2015-06-09 7:56 ` Richard Biener
2015-06-09 11:46 ` Marc Glisse
2015-06-09 11:49 ` Richard Biener
2015-06-09 11:57 ` Richard Biener [this message]
2015-06-09 12:13 ` Marc Glisse
2015-06-09 12:22 ` Richard Biener
2015-06-09 13:46 ` Marek Polacek
2015-06-09 14:11 ` Richard Biener
2015-05-28 13:16 ` Richard Biener
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=alpine.LSU.2.11.1506091348160.30088@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=marc.glisse@inria.fr \
--cc=polacek@redhat.com \
--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).