aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2017-11-16 11:54:49 +0000
committerWilco Dijkstra <wilco@gcc.gnu.org>2017-11-16 11:54:49 +0000
commit81825e283f6cec28db73af9769602b953d683e3e (patch)
tree8126f7147441bbeb11d41053c993f7ae1046aa37 /gcc/tree-vrp.c
parentefeee67f4c9fd021d2594e0271c84b7e90e63d3d (diff)
downloadgcc-81825e283f6cec28db73af9769602b953d683e3e.zip
gcc-81825e283f6cec28db73af9769602b953d683e3e.tar.gz
gcc-81825e283f6cec28db73af9769602b953d683e3e.tar.bz2
Canonicalize constant multiplies in division
This patch implements some of the optimizations discussed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71026. Canonicalize x / (C1 * y) into (x * C2) / y. This moves constant multiplies out of the RHS of a division in order to allow further simplifications (such as (C1 * x) / (C2 * y) -> (C3 * x) / y) and to enable more reciprocal CSEs. 2017-11-16 Wilco Dijkstra <wdijkstr@arm.com> Jackson Woodruff <jackson.woodruff@arm.com> gcc/ PR tree-optimization/71026 * match.pd: Canonicalize constant multiplies in division. gcc/testsuite/ PR tree-optimization/71026 * gcc.dg/cse_recip.c: New test. Co-Authored-By: Jackson Woodruff <jackson.woodruff@arm.com> From-SVN: r254816
Diffstat (limited to 'gcc/tree-vrp.c')
0 files changed, 0 insertions, 0 deletions