PR rtl-optimization/28173
commitd7517e934497c8674cb53cb05195f491efff9103
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Feb 2007 00:54:29 +0000 (19 00:54 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Feb 2007 00:54:29 +0000 (19 00:54 +0000)
tree0df33a267eac0cd5b69159ce8812e9f705957b24
parent38b6da9402772478706db775eab6ee85c3a3395f
PR rtl-optimization/28173
* simplify-rtx.c (simplify_binary_operation_1) <IOR>:  Optimize
(X & C1) | C2 as C2 when (C1 & C2) == C1 and X has no side-effects.
Optimize (X & C1) | C2 as X | C2 when (C1 | C2) == ~0.
Canonicalize (X & C1) | C2 as (X & (C1 & ~C2)) | C2.
<AND>: Canonicalize (X | C1) & C2 as (X & C2) | (C1 & C2).

* gcc.target/i386/andor-1.c: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122116 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/simplify-rtx.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/andor-1.c [new file with mode: 0644]