* fold-const.c (fold) <BIT_IOR_EXPR>: Optimize ~X|X and X|~X as -1.
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Jun 2004 15:23:46 +0000 (15:23 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Jun 2004 15:23:46 +0000 (15:23 +0000)
commit990bbbfa590f8555e66b4b5038a4b74ab24e1d8c
treebf00b8dfd6d9b655b708894fca96a9f725e3610a
parent573c13ef714df1ba4922ebbd7b6be27d37d531f6
* fold-const.c (fold) <BIT_IOR_EXPR>: Optimize ~X|X and X|~X as -1.
<BIT_XOR_EXPR>: Optimize ~X|X and X|~X as -1.
<BIT_AND_EXPR>: Optimize ~X&X and X&~X as 0.
<TRUTH_AND_EXPR, TRUTH_ANDIF_EXPR>: Optimize !X&&X and X&&!X as false.
        <TRUTH_OR_EXPR, TRUTH_ORIF_EXPR>: Optimize !X||X and !X||X as true.
<TRUTH_XOR_EXPR>: Optimize !X^X and X^X! as true.  Now that
TRUTH_XOR_EXPR is a commutative tree code, don't test whether arg0
is a constant.

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

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