lambda-code.c (replace_uses_equiv_to_x_with_y): Check step and access function agains...
authorDaniel Berlin <dberlin@dberlin.org>
Fri, 10 Jun 2005 21:34:07 +0000 (21:34 +0000)
committerDaniel Berlin <dberlin@gcc.gnu.org>
Fri, 10 Jun 2005 21:34:07 +0000 (21:34 +0000)
2005-06-10  Daniel Berlin  <dberlin@dberlin.org>

* lambda-code.c (replace_uses_equiv_to_x_with_y): Check step
and access function against chrec_dont_know.

From-SVN: r100831

gcc/ChangeLog
gcc/lambda-code.c

index 5ec8206ef413b49a99b89ccb27ba19850feaf963..8b204a5983f81d91328874ac264cac76814f378a 100644 (file)
@@ -1,7 +1,12 @@
+2005-06-10  Daniel Berlin  <dberlin@dberlin.org>
+
+       * lambda-code.c (replace_uses_equiv_to_x_with_y): Check step
+       and access function against chrec_dont_know.
+         
 2005-06-10  Daniel Berlin  <dberlin@dberlin.org>
 
        * lambda-code.c (replace_uses_of_x_with_y): Renamed and rewritten
-        slightly.
+       slightly.
        (exit_phi_for_loop_p): New function.
        (can_put_in_inner_loop): Ditto.
        (can_convert_to_perfect_nest): Ditto.
index cedc8cd129f10ef8bcb128967f797ab2d0072415..6dbbe6d8b8bdf8c3f1142a1929c2e69d3528dbca 100644 (file)
@@ -2182,9 +2182,9 @@ replace_uses_equiv_to_x_with_y (struct loop *loop, tree stmt, tree x,
       
       access_fn = instantiate_parameters
        (loop, analyze_scalar_evolution (loop, use));
-      if (access_fn != NULL_TREE)
+      if (access_fn != NULL_TREE && access_fn != chrec_dont_know)
        step = evolution_part_in_loop_num (access_fn, loop->num);
-      if ((step && int_cst_value (step) == xstep)
+      if ((step && step != chrec_dont_know && int_cst_value (step) == xstep)
          || USE_FROM_PTR (use_p) == x)
        SET_USE (use_p, y);
     }