Simplify 3*x == 3*y for wrapping types
authorMarc Glisse <marc.glisse@inria.fr>
Wed, 28 Jun 2017 09:22:30 +0000 (11:22 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Wed, 28 Jun 2017 09:22:30 +0000 (09:22 +0000)
commit42bd89ce072220f3569cb5e761235dcf1c675c68
tree5fb4ca44d3407af3a15cbc4392d4ebc6933067b7
parent883312dc79806f513275b72502231c751c14ff72
Simplify 3*x == 3*y for wrapping types

2017-06-28  Marc Glisse  <marc.glisse@inria.fr>

gcc/
* match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
(x * C EQ/NE y * C): New transformation.

gcc/testsuite/
* gcc.dg/tree-ssa/addadd.c: Remove test duplicated in addadd-2.c.
* gcc.dg/tree-ssa/mulcmp-1.c: New file.

From-SVN: r249732
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/addadd.c
gcc/testsuite/gcc.dg/tree-ssa/mulcmp-1.c [new file with mode: 0644]