X+Y < X iff Y<0 moved to match.pd
commit6358a676c3eb4c6df013ce8319bcf429cd14232b
authorMarc Glisse <marc.glisse@inria.fr>
Wed, 11 Oct 2017 13:18:06 +0000 (11 15:18 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Wed, 11 Oct 2017 13:18:06 +0000 (11 13:18 +0000)
tree61016df93fd440c4971cd59ede26e0ce978eaaea
parentb4ec1d31a5d605c8bea45ca919d3a60dfdac771f
X+Y < X iff Y<0 moved to match.pd

2017-10-11  Marc Glisse  <marc.glisse@inria.fr>

gcc/
* fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
* match.pd: ... here.
((T) X == (T) Y): Relax condition.

gcc/testsuite/
* gcc.dg/Wstrict-overflow-7.c: Xfail.
* gcc.dg/pragma-diag-3.c: Likewise.

From-SVN: r253642
gcc/ChangeLog
gcc/fold-const.c
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wstrict-overflow-7.c
gcc/testsuite/gcc.dg/pragma-diag-3.c