]> git.ipfire.org Git - thirdparty/gcc.git/commit
Set bound/cmp/control for until wrap loop.
authorJiufu Guo <guojiufu@linux.ibm.com>
Wed, 22 Sep 2021 05:20:29 +0000 (13:20 +0800)
committerJiufu Guo <guojiufu@linux.ibm.com>
Wed, 22 Sep 2021 13:03:08 +0000 (21:03 +0800)
commit3087d1b0a2cbe8880ccbbb67744726ff4e5d390e
treefe5b08c9311ba6976decf4af95503040ff94e370
parentfec75ab8c02be904de2963c0adb6d1e940a59761
Set bound/cmp/control for until wrap loop.

In patch r12-3136, niter->control, niter->bound and niter->cmp are
derived from number_of_iterations_lt.  While for 'until wrap condition',
the calculation in number_of_iterations_lt is not align the requirements
on the define of them and requirements in determine_exit_conditions.

This patch calculate niter->control, niter->bound and niter->cmp in
number_of_iterations_until_wrap.

gcc/ChangeLog:

2021-09-22  Jiufu Guo  <guojiufu@linux.ibm.com>

PR tree-optimization/102087
* tree-ssa-loop-niter.c (number_of_iterations_until_wrap):
Update bound/cmp/control for niter.

gcc/testsuite/ChangeLog:

2021-09-22  Jiufu Guo  <guojiufu@linux.ibm.com>

* gcc.dg/pr102087.c: New test.
PR tree-optimization/102087
gcc/testsuite/gcc.dg/pr102087.c [new file with mode: 0644]
gcc/tree-ssa-loop-niter.c