re PR tree-optimization/85726 (div C1 to div C2 match.pd suboptimization)
authorJakub Jelinek <jakub@redhat.com>
Thu, 6 Dec 2018 10:45:47 +0000 (11:45 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 6 Dec 2018 10:45:47 +0000 (11:45 +0100)
commit98610dc5b630a8ee7f39ed48d45e58fb044dbec1
tree31424dd67a7c75abf968575cec641c895751abdd
parenta126d36172d336ee92f18b5c0fcf60a16690c2f0
re PR tree-optimization/85726 (div C1 to div C2 match.pd suboptimization)

PR tree-optimization/85726
* generic-match-head.c (optimize_successive_divisions_p): New function.
* gimple-match-head.c (optimize_successive_divisions_p): Likewise.
* match.pd: Don't combine successive divisions if they aren't exact
and optimize_successive_divisions_p is false.

* gcc.dg/tree-ssa/pr85726-1.c: New test.
* gcc.dg/tree-ssa/pr85726-2.c: New test.
* gcc.dg/tree-ssa/pr85726-3.c: New test.
* gcc.dg/tree-ssa/pr85726-4.c: New test.

From-SVN: r266848
gcc/ChangeLog
gcc/generic-match-head.c
gcc/gimple-match-head.c
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr85726-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr85726-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr85726-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr85726-4.c [new file with mode: 0644]