Move "X +- C1 CMP C2 to X CMP C2 -+ C1" to match.pd
authorMarc Glisse <marc.glisse@inria.fr>
Mon, 2 May 2016 14:09:07 +0000 (16:09 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Mon, 2 May 2016 14:09:07 +0000 (14:09 +0000)
commita8b85ce9e2bffc9fcacaf0cfbbb803b01f7598e8
tree7567c427730a007f93a9f0c7a26e2c9deebd6207
parent5b37e8664b05336df60996a2411b4d61a852c613
Move "X +- C1 CMP C2 to X CMP C2 -+ C1" to match.pd

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

gcc/
* flag-types.h (enum warn_strict_overflow_code): Move ...
* coretypes.h: ... here.
* fold-const.h (fold_overflow_warning): Declare.
* fold-const.c (fold_overflow_warning): Make non-static.
(fold_comparison): Move the transformation of X +- C1 CMP C2
into X CMP C2 -+ C1 ...
* match.pd: ... here.
* gimple-fold.c (fold_stmt_1): Protect with
fold_defer_overflow_warnings.

gcc/testsuite/
* gcc.dg/tree-ssa/20040305-1.c: Adjust.

From-SVN: r235760
gcc/ChangeLog
gcc/coretypes.h
gcc/flag-types.h
gcc/fold-const.c
gcc/fold-const.h
gcc/gimple-fold.c
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/20040305-1.c