re PR middle-end/64309 (if (1 & (1 << n)) not simplified to if (n == 0))
authorMarek Polacek <polacek@redhat.com>
Tue, 16 Dec 2014 18:29:01 +0000 (18:29 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 16 Dec 2014 18:29:01 +0000 (18:29 +0000)
commit01ada710782bb14c86d7caed1813efa593740eab
tree934c45cf87fd29677d4acbc201a26aaddb8742ee
parentd0af2c6589e1eca2142c6fed09d741820ea96bf3
re PR middle-end/64309 (if (1 & (1 << n)) not simplified to if (n == 0))

PR middle-end/64309
* match.pd: Add ((1 << A) & 1) != 0 -> A == 0 and
((1 << A) & 1) == 0 -> A != 0.

* gcc.dg/pr64309.c: New test.

From-SVN: r218787
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr64309.c [new file with mode: 0644]