This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]