OSDN Git Service

* fold-const.c (fold_binary) <BIT_XOR_EXPR>: Fold (X & 1) ^ 1 as
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 26 Feb 2006 16:10:30 +0000 (16:10 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 26 Feb 2006 16:10:30 +0000 (16:10 +0000)
commit7ddc480e76afa04fbbe106a5df8fe571f04087a2
tree023ddcdab0e55bd4a22ee47cd852342b1535a05e
parent1d8ff0d259a49c3a172fb5ef215cb01dcec2605e
* fold-const.c (fold_binary) <BIT_XOR_EXPR>: Fold (X & 1) ^ 1 as
(X & 1) == 0.
<BIT_AND_EXPR>: Fold (X ^ 1) & 1 and ~X & 1 as (X & 1) == 0.

* gcc.dg/fold-even-1.c: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111454 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/fold-even-1.c [new file with mode: 0644]