------- Comment #4 from rguenth at gcc dot gnu dot org 2009-06-16 14:01 -------
It looks like the fix is
Index: gcc/tree-chrec.h
===================================================================
--- gcc/tree-chrec.h (revision 148523)
+++ gcc/tree-chrec.h (working copy)
@@ -132,7 +132,8 @@ build_polynomial_chrec (unsigned loop_nu
|| right == chrec_dont_know)
return chrec_dont_know;
- if (no_evolution_in_loop_p (left, loop_num, &val) && !val)
+ if (!no_evolution_in_loop_p (left, loop_num, &val)
+ || !val)
return chrec_dont_know;
/* Pointer types should occur only on the left hand side, i.e. in
to make its result consistent for constant vs. non-constant chrecs.
{0, +, {1, +, 2}_1}_1 * {0, +, 1}_1 -> scev_not_known
but
{0, +, {D.21167_5, +, D.21167_5 * 2}_1}_1 * {0, +, 1}_1
-> {0, +, {{D.21167_5, +, D.21167_5 * 2}_1, +, {D.21167_5 * 2, +, D.21167_5
* 4}_1}_1}_1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40460