Simple bitop reassoc in match.pd
authorMarc Glisse <marc.glisse@inria.fr>
Tue, 10 May 2016 19:52:20 +0000 (21:52 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Tue, 10 May 2016 19:52:20 +0000 (19:52 +0000)
commite39dab2c21c0e1fe615a1050da051c8088cb3267
tree0a73b6e9c04150d305bc301e3cee930e37a9d50d
parent601070fce9761f7665d5916c786fe065f3165c00
Simple bitop reassoc in match.pd

2016-05-10  Marc Glisse  <marc.glisse@inria.fr>

gcc/
* fold-const.c (fold_binary_loc) [(X ^ Y) & Y]: Remove and merge with...
* match.pd ((X & Y) ^ Y): ... this.
((X & Y) & Y, (X | Y) | Y, (X ^ Y) ^ Y, (X & Y) & (X & Z), (X | Y)
| (X | Z), (X ^ Y) ^ (X ^ Z)): New transformations.

gcc/testsuite/
* gcc.dg/tree-ssa/bit-assoc.c: New testcase.
* gcc.dg/tree-ssa/pr69270.c: Adjust.
* gcc.dg/tree-ssa/vrp59.c: Disable forwprop.

From-SVN: r236103
gcc/ChangeLog
gcc/fold-const.c
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/bit-assoc.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr69270.c
gcc/testsuite/gcc.dg/tree-ssa/vrp59.c