Move some comparison simplifications to match.pd
authorMarc Glisse <marc.glisse@inria.fr>
Mon, 31 Aug 2015 14:02:00 +0000 (16:02 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Mon, 31 Aug 2015 14:02:00 +0000 (14:02 +0000)
commitb0eb889bf88eff3316690c6397a7f3dc75fbeda7
treea33c135ce9d2d8750a86956b05a1741e6d13de2e
parentf196d062919feaf10ec10c67ac0d20f15fcfd2f5
Move some comparison simplifications to match.pd

2015-08-31  Marc Glisse  <marc.glisse@inria.fr>

gcc/
* tree.h (zerop): New function.
* tree.c (zerop): Likewise.
(element_precision): Handle expressions.
* match.pd (define_predicates): Add zerop.
(x <= +Inf): Fix comment.
(abs (x) == 0, A & C == C, A & C != 0): Converted from ...
* fold-const.c (fold_binary_loc): ... here. Remove.

gcc/testsuite/
* gcc.dg/tree-ssa/cmp-1.c: New file.

From-SVN: r227346
gcc/ChangeLog
gcc/fold-const.c
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/cmp-1.c [new file with mode: 0644]
gcc/tree.c
gcc/tree.h