Re: [PATCH] Canonicalize negates in division

2017-10-18 Thread Richard Biener
On Tue, Oct 17, 2017 at 6:30 PM, Wilco Dijkstra wrote: > This patch implements some of the optimizations discussed in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71026. > > Canonicalize x / (- y) into (-x) / y. > > This moves negates out of the RHS of a division in

[PATCH] Canonicalize negates in division

2017-10-17 Thread Wilco Dijkstra
This patch implements some of the optimizations discussed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71026. Canonicalize x / (- y) into (-x) / y. This moves negates out of the RHS of a division in order to allow further simplifications and potentially more reciprocal CSEs. OK for commit?