re PR tree-optimization/42521 (ICE: in graphite_loop_normal_form, at graphite-sese-to-poly.c:2844)

Fix PR42521.

2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>

	PR middle-end/42521
	* graphite.c (graphite_finalize): Call scev_reset.
	(graphite_transform_loops): Do not call scev_reset between the code
	generation of scops.

	* testsuite/gcc.dg/graphite/pr42521.c: New.

From-SVN: r155728
This commit is contained in:
Sebastian Pop 2010-01-08 07:39:01 +00:00 committed by Sebastian Pop
parent eaffa76227
commit fd4a56fff2
3 changed files with 29 additions and 4 deletions

View File

@ -1,3 +1,12 @@
2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/42521
* graphite.c (graphite_finalize): Call scev_reset.
(graphite_transform_loops): Do not call scev_reset between the code
generation of scops.
* testsuite/gcc.dg/graphite/pr42521.c: New.
2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
* graphite-interchange.c (memory_stride_in_loop): Renamed

View File

@ -228,6 +228,7 @@ graphite_finalize (bool need_cfg_cleanup_p)
{
if (need_cfg_cleanup_p)
{
scev_reset ();
cleanup_tree_cfg ();
profile_status = PROFILE_ABSENT;
release_recorded_exits ();
@ -279,10 +280,7 @@ graphite_transform_loops (void)
check_poly_representation (scop);
if (transform_done)
{
scev_reset ();
need_cfg_cleanup_p = true;
}
need_cfg_cleanup_p = true;
}
htab_delete (bb_pbb_mapping);

View File

@ -0,0 +1,18 @@
/* { dg-options "-O3 -fgraphite-identity" } */
extern int *A;
extern int B[][4];
void foo(int im, int jm, int cond)
{
int i, j;
if (cond)
for (i = 0; i < 256; i++)
A[i] = 0;
for (i = 0; i < im; i++)
for (j = 1; j < jm; j++)
if (jm != 8 || j != jm >> 1)
B[j][0] ^= B[j-1][0];
}