[PATCH PR84648]Adjust loop exit conditions for loop-until-wrap cases.

bin.cheng bin.cheng@linux.alibaba.com
Sun Nov 11 08:02:00 GMT 2018


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.cheng@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.cheng@linux.alibaba.com>

        PR tree-optimization/84648
        * gcc.dg/tree-ssa/pr84648.c: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-pr84648-by-adjusting-exit-cond-for-loop-until-wr.patch
Type: application/octet-stream
Size: 4604 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181111/949fc910/attachment.obj>


More information about the Gcc-patches mailing list