https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71026
--- Comment #9 from Wilco <wilco at gcc dot gnu.org> --- Author: wilco Date: Thu Nov 16 11:54:49 2017 New Revision: 254816 URL: https://gcc.gnu.org/viewcvs?rev=254816&root=gcc&view=rev Log: 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 <wdijk...@arm.com> Jackson Woodruff <jackson.woodr...@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. Added: trunk/gcc/testsuite/gcc.dg/cse_recip.c Modified: trunk/gcc/ChangeLog trunk/gcc/match.pd trunk/gcc/testsuite/ChangeLog