Hi,
This patch fixes PR84648 by adjusting exit conditions for loop-until-wrap cases.
It only handles simple cases in which IV.base are constants because we rely on
current niter analyzer which doesn't handle parameterized bound in wrapped
case.  It could be relaxed in the future.

Bootstrap and test on x86_64 in progress.

Thanks,
bin
2018-11-11  Bin Cheng  <bin.ch...@linux.alibaba.com>

        PR tree-optimization/84648
        * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
        (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
        by calling adjust_cond_for_loop_until_wrap.

2018-11-11  Bin Cheng  <bin.ch...@linux.alibaba.com>

        PR tree-optimization/84648
        * gcc.dg/tree-ssa/pr84648.c: New test.

Attachment: 0001-Fix-pr84648-by-adjusting-exit-cond-for-loop-until-wr.patch
Description: Binary data

Reply via email to