Commit 98d59fe6 by Zdenek Dvorak Committed by Zdenek Dvorak

re PR tree-optimization/24483 (ICE in ivopts)

	PR tree-optimization/24483
	* tree-ssa-loop-ivopts.c (aff_combination_add_elt): Move rest
	field to elts if possible.

From-SVN: r106440
parent ca0b7d18
2005-11-03 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/24483
* tree-ssa-loop-ivopts.c (aff_combination_add_elt): Move rest
field to elts if possible.
2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/23155
......
......@@ -2761,6 +2761,15 @@ aff_combination_add_elt (struct affine_tree_combination *comb, tree elt,
comb->n--;
comb->coefs[i] = comb->coefs[comb->n];
comb->elts[i] = comb->elts[comb->n];
if (comb->rest)
{
gcc_assert (comb->n == MAX_AFF_ELTS - 1);
comb->coefs[comb->n] = 1;
comb->elts[comb->n] = comb->rest;
comb->rest = NULL_TREE;
comb->n++;
}
return;
}
if (comb->n < MAX_AFF_ELTS)
......@@ -2793,7 +2802,7 @@ aff_combination_add (struct affine_tree_combination *comb1,
unsigned i;
comb1->offset = (comb1->offset + comb2->offset) & comb1->mask;
for (i = 0; i < comb2-> n; i++)
for (i = 0; i < comb2->n; i++)
aff_combination_add_elt (comb1, comb2->elts[i], comb2->coefs[i]);
if (comb2->rest)
aff_combination_add_elt (comb1, comb2->rest, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment