re PR tree-optimization/33512 (Simple bitwise simplification missed)
authorAndrew Pinski <apinski@cavium.com>
Tue, 24 Apr 2012 07:05:09 +0000 (07:05 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Tue, 24 Apr 2012 07:05:09 +0000 (00:05 -0700)
commita1e179f5b74bef253aa2020eb5d21b292c42f441
tree4318a722cabc2b845a5409a42ace68e3ffa59666
parent57ac4c34019b76318bad402a8715992b65dcd969
re PR tree-optimization/33512 (Simple bitwise simplification missed)

2012-04-24  Andrew Pinski  <apinski@cavium.com>

PR tree-opt/33512
* tree-ssa-forwprop.c (defcodefor_name): New function.
(simplify_bitwise_binary): Use defcodefor_name instead of manually
Simplify "( X | Y) & X" to X and "( X & Y) | X" to X.
Simplify "(~X | Y) & X" to "X & Y" and
"(~X & Y) | X" to "X | Y".

2012-04-24  Andrew Pinski  <apinski@cavium.com>

PR tree-opt/33512
* gcc.dg/tree-ssa/andor-3.c: New testcase.
* gcc.dg/tree-ssa/andor-4.c: New testcase.
* gcc.dg/tree-ssa/andor-5.c: New testcase.

From-SVN: r186749
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/andor-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/andor-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/andor-5.c [new file with mode: 0644]
gcc/tree-ssa-forwprop.c