Simplify more EXACT_DIV_EXPR comparisons
authorMarc Glisse <marc.glisse@inria.fr>
Fri, 31 May 2019 16:54:30 +0000 (18:54 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Fri, 31 May 2019 16:54:30 +0000 (16:54 +0000)
commit9cf60d3b0d793fbd3b97aa0163b44a5c0c4e9aa3
tree79fec5f3316ae1b6c21485ab9aae4b5626f85b66
parentf4fde1b378ad68fb2dec6719ed26c1b901488e03
Simplify more EXACT_DIV_EXPR comparisons

2019-05-31  Marc Glisse  <marc.glisse@inria.fr>

gcc/
* match.pd (X/[ex]D<Y/[ex]D): Handle negative denominator.
((size_t)(A /[ex] B) CMP C): New transformation.

gcc/testsuite/
* gcc.dg/tree-ssa/cmpexactdiv-3.c: New file.
* gcc.dg/tree-ssa/cmpexactdiv-4.c: New file.
* gcc.dg/Walloca-13.c: Xfail.

From-SVN: r271816
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Walloca-13.c
gcc/testsuite/gcc.dg/tree-ssa/cmpexactdiv-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/cmpexactdiv-4.c [new file with mode: 0644]