Use max_loop_iterations in transform_to_exit_first_loop_alt
authorTom de Vries <tom@codesourcery.com>
Tue, 30 Jun 2015 08:35:57 +0000 (08:35 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Tue, 30 Jun 2015 08:35:57 +0000 (08:35 +0000)
commit4f75d60893e092cffcbe422825ce4dc092d3fb9e
treeca50ebb2d0d7f8b30b28938281260d4d17f52bd2
parent4fe651724763ce1a438b5497621510a4185e069e
Use max_loop_iterations in transform_to_exit_first_loop_alt

2015-06-30  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/66652
* tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
max_loop_iterations to determine if nit + 1 overflows.

* testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (f): Rewrite
using restrict pointers.
(main): Add arguments to calls to f.
* testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.

* gcc.dg/parloops-exit-first-loop-alt-pr66652.c: New test.
* gcc.dg/parloops-exit-first-loop-alt-3.c (f):  Rewrite using restrict
pointers.
* gcc.dg/parloops-exit-first-loop-alt.c: Same.

From-SVN: r225162
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/parloops-exit-first-loop-alt-3.c
gcc/testsuite/gcc.dg/parloops-exit-first-loop-alt-pr66652.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/parloops-exit-first-loop-alt.c
gcc/tree-parloops.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c
libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt.c