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]

Re: [PATCH, PR66652] Use max_loop_iterations in transform_to_exit_first_loop_alt


On 06/29/2015 08:24 AM, Tom de Vries wrote:
Hi,

this patch fixes PR66652.

It uses max_loop_iterations in transform_to_exit_first_loop_alt to
ensure that the new loop bound nit + 1 doesn't overflow.

Bootstrapped and reg-tested on x86_64.

OK for trunk?

Thanks,
- Tom

0001-Use-max_loop_iterations-in-transform_to_exit_first_l.patch


Use max_loop_iterations in transform_to_exit_first_loop_alt

2015-06-29  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.
OK.

Make sure to put the PR marker in the testsuite/ChangeLog entry and drop the testsuite/ prefix in the testsuite/ChangeLog entry.

jeff


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