re PR tree-optimization/59058 (wrong code at -O3 on x86_64-linux-gnu (affecting gcc...
authorRichard Biener <rguenther@suse.de>
Fri, 6 Dec 2013 09:23:07 +0000 (09:23 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 6 Dec 2013 09:23:07 +0000 (09:23 +0000)
commit95b3eff34ea98fcd67460f208004f5baddc29f0b
treed490ce409763d3445fb2ba74ac78008e8d55f526
parent3fc92e702e2a3a109cacb81416557d550e26ce44
re PR tree-optimization/59058 (wrong code at -O3 on x86_64-linux-gnu (affecting gcc 4.6 to trunk))

2013-12-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/59058
* tree-vectorizer.h (struct _loop_vec_info): Add num_itersm1
member.
(LOOP_VINFO_NITERSM1): New macro.
* tree-vect-loop-manip.c (slpeel_tree_peel_loop_to_edge): Express
the vector loop entry test in terms of scalar latch executions.
(vect_do_peeling_for_alignment): Update LOOP_VINFO_NITERSM1.
* tree-vect-loop.c (vect_get_loop_niters): Also return the
number of latch executions.
(new_loop_vec_info): Initialize LOOP_VINFO_NITERSM1.
(vect_analyze_loop_form): Likewise.
(vect_generate_tmps_on_preheader): Compute the number of
vectorized iterations differently.

* gcc.dg/torture/pr59058.c: New testcase.

From-SVN: r205730
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr59058.c [new file with mode: 0644]
gcc/tree-vect-loop-manip.c
gcc/tree-vect-loop.c
gcc/tree-vectorizer.h