diff options
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r-- | gcc/tree-ssa-loop-manip.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index 68e0fa6..a23c787 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -625,7 +625,16 @@ can_unroll_loop_p (struct loop *loop, unsigned factor, return false; if (!number_of_iterations_exit (loop, exit, niter, false) - || niter->cmp == ERROR_MARK) + || niter->cmp == ERROR_MARK + /* Scalar evolutions analysis might have copy propagated + the abnormal ssa names into these expressions, hence + emiting the computations based on them during loop + unrolling might create overlapping life ranges for + them, and failures in out-of-ssa. */ + || contains_abnormal_ssa_name_p (niter->may_be_zero) + || contains_abnormal_ssa_name_p (niter->control.base) + || contains_abnormal_ssa_name_p (niter->control.step) + || contains_abnormal_ssa_name_p (niter->bound)) return false; /* And of course, we must be able to duplicate the loop. */ |