2015-06-30 Richard Biener <rguenther@suse.de>
commit98b69bccadeae2fb64adde8ff008f79ec5963381
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jun 2015 11:58:48 +0000 (30 11:58 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jun 2015 11:58:48 +0000 (30 11:58 +0000)
treef7cd6a66425a4813b96dd9a091c09540c5b92b2e
parentd7a904bc5095619f4baa84acdf6d08ee67f693bf
2015-06-30  Richard Biener  <rguenther@suse.de>

* fold-const.c (fold_unary_loc): Move abs(abs(x)) -> abs(x),
~ (-A) to A - 1, ~ (A - 1) or ~ (A + -1) to -A and some cases of
~(X ^ Y) to ~X ^ Y or X ^ ~Y if ~X or ~Y simplify to ...
* match.pd: ... here.
Add a few cases of A - B -> A + (-B) when B "easily" negates.
Move (x & y) | x -> x and friends before
(x | CST1) & CST2 -> (x & CST2) | (CST1 & CST2).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225178 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/match.pd