re PR tree-optimization/36630 (ICE in vect_update_ivs_after_vectorizer)

PR tree-optimization/36630
	* tree-vect-transform.c (vect_update_ivs_after_vectorizer):
	Call STRIP_NOPS before calling evolution_part_in_loop_num.


Co-Authored-By: Ira Rosen <irar@il.ibm.com>

From-SVN: r140085
This commit is contained in:
Richard Guenther 2008-09-07 10:05:37 +00:00 committed by Ira Rosen
parent fe2c39c8c2
commit 73356a7d3b
4 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2008-09-07 Richard Guenther <rguenther@suse.de>
Ira Rosen <irar@il.ibm.com>
PR tree-optimization/36630
* tree-vect-transform.c (vect_update_ivs_after_vectorizer):
Call STRIP_NOPS before calling evolution_part_in_loop_num.
2008-09-07 Dorit Nuzman <dorit@il.ibm.com>
Ira Rosen <irar@il.ibm.com>

View File

@ -1,3 +1,9 @@
2008-09-07 Richard Guenther <rguenther@suse.de>
Ira Rosen <irar@il.ibm.com>
PR tree-optimization/36630
* gcc.dg/vect/pr36630.c: New test.
2008-09-07 Daniel Kraft <d@domob.eu>
* gfortran.dg/stfunc_6.f90: Extended testcase to include more tests

View File

@ -0,0 +1,16 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
void
foo (unsigned char *x, short y)
{
short i;
i = 2;
while (i < y)
{
x[i - 1] = x[i];
i = i + 1;
}
}
/* { dg-final { cleanup-tree-dump "vect" } } */

View File

@ -7332,6 +7332,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters,
access_fn = analyze_scalar_evolution (loop, PHI_RESULT (phi));
gcc_assert (access_fn);
STRIP_NOPS (access_fn);
evolution_part =
unshare_expr (evolution_part_in_loop_num (access_fn, loop->num));
gcc_assert (evolution_part != NULL_TREE);