* fold-const.c (fold_comparison): Clean up and extend X +- C1 CMP C2
commit32ce9a5c4208411361402f60e672c4830da0bc8f
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 May 2014 19:54:46 +0000 (27 19:54 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 May 2014 19:54:46 +0000 (27 19:54 +0000)
treee6ac227a3d7680dd7465cbd862d98caa0511d604
parent49523e2f0b01f0d5e58b16279115be1ab1393147
* fold-const.c (fold_comparison): Clean up and extend X +- C1 CMP C2
to X CMP C2 -+ C1 transformation to EQ_EXPR/NE_EXPR.
Add X - Y CMP 0 to X CMP Y transformation.
(fold_binary_loc) <EQ_EXPR/NE_EXPR>: Remove same transformations.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210979 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wstrict-overflow-25.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-compare-8.c [new file with mode: 0644]