https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #13 from rguenther at suse dot de rguenther at suse dot de ---
On December 15, 2014 10:11:13 PM CET, glisse at gcc dot gnu.org
gcc-bugzi...@gcc.gnu.org wrote:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #12 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #14 from Marek Polacek mpolacek at gcc dot gnu.org ---
Author: mpolacek
Date: Tue Dec 16 18:29:01 2014
New Revision: 218787
URL: https://gcc.gnu.org/viewcvs?rev=218787root=gccview=rev
Log:
PR middle-end/64309
* match.pd: Add
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
Marek Polacek mpolacek at gcc dot gnu.org changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
Richard Biener rguenth at gcc dot gnu.org changed:
What|Removed |Added
Keywords|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
Marek Polacek mpolacek at gcc dot gnu.org changed:
What|Removed |Added
CC||mpolacek at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
Marek Polacek mpolacek at gcc dot gnu.org changed:
What|Removed |Added
Status|NEW |ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #4 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Richard Biener from comment #1)
Confirmed. Sth like
(simplify
(ne (bit_and (lshift integer_onep @0) integer_onep) integer_zerop)
(eq @0 { build_zero_cst
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #5 from Marek Polacek mpolacek at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #4)
(In reply to Richard Biener from comment #1)
Confirmed. Sth like
(simplify
(ne (bit_and (lshift integer_onep @0) integer_onep)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #6 from Marc Glisse glisse at gcc dot gnu.org ---
(In reply to Marek Polacek from comment #5)
I don't think so. I tried to come up with a more general transformation
that would simplify ((CST n) CST) != 0, but I haven't found
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #7 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Marek Polacek from comment #5)
I don't think so. I tried to come up with a more general transformation
that would simplify ((CST n) CST) != 0, but I haven't found
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #8 from Marek Polacek mpolacek at gcc dot gnu.org ---
(In reply to Marc Glisse from comment #6)
(In reply to Marek Polacek from comment #5)
I don't think so. I tried to come up with a more general transformation
that would
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #9 from Jakub Jelinek jakub at gcc dot gnu.org ---
(1 n) 5 != 0 - n == 0 || n == 2 (not beneficial)
Not only that, we actually emit similar comparisons as a bit test intentionally
even if you write it in a switch or series of ifs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #10 from Marek Polacek mpolacek at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #7)
(In reply to Marek Polacek from comment #5)
I don't think so. I tried to come up with a more general transformation
that would
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #11 from Marc Glisse glisse at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #7)
(1 n) 6 != 0 - n 0 n 3 (not beneficial)
We usually spell it (unsigned)n-12 (still not that great).
(In reply to Marek Polacek from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64309
--- Comment #12 from Marc Glisse glisse at gcc dot gnu.org ---
(In reply to Marc Glisse from comment #11)
((pow2p)(pow2n))!=0 - p==n
Oups, it wasn't supposed to be the same power of 2, so:
(((1k)p)((1l)n))!=0 - p==n+(l-k)
(k and l are
15 matches
Mail list logo