summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/unroll.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/unroll.c')
-rw-r--r--contrib/gcc/unroll.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/gcc/unroll.c b/contrib/gcc/unroll.c
index d6dbcf0..376bc99 100644
--- a/contrib/gcc/unroll.c
+++ b/contrib/gcc/unroll.c
@@ -3682,10 +3682,14 @@ loop_iterations (loop_start, loop_end, loop_info)
return 0;
}
- /* The only new registers that care created before loop iterations are
- givs made from biv increments, so this should never occur. */
-
- if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements)
+ /* The only new registers that are created before loop iterations
+ are givs made from biv increments or registers created by
+ load_mems. In the latter case, it is possible that try_copy_prop
+ will propagate a new pseudo into the old iteration register but
+ this will be marked by having the REG_USERVAR_P bit set. */
+
+ if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements
+ && ! REG_USERVAR_P (iteration_var))
abort ();
iteration_info (iteration_var, &initial_value, &increment,
OpenPOWER on IntegriCloud