On Sat, Jun 20, 2015 at 9:12 AM, Kugan <kugan.vivekanandara...@linaro.org> wrote: > As discussed in PR64130, this patch improves the VRP value ranges for > unsigned division. > > Bootstrapped and regression tested on x86_64-linux-gnu and regression > tested on arm-none-linux-gnu with no new regression. > > Is this OK for trunk?
Hum, the patch is at least incomplete not covering the cmp == -1 case in the max value computation, no? Also I wonder if we have two VR_RANGEs as you require the code using extract_range_from_multiplicative_op_1 isn't better suited and already handles the case properly? Richard. > Thanks, > Kugan > > gcc/ChangeLog: > > 2015-06-20 Kugan Vivekanandarajah <kug...@linaro.org> > > PR middle-end/64130 > * tree-vrp.c (extract_range_from_binary_expr_1): For unsigned > division, compute minimum when value ranges for dividend and > divisor are available. > > > gcc/testsuite/ChangeLog: > > 2015-06-20 Kugan Vivekanandarajah <kug...@linaro.org> > > PR middle-end/64130 > * gcc.dg/tree-ssa/pr64130.c: New test.