aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/predict.c')
-rw-r--r--gcc/predict.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/predict.c b/gcc/predict.c
index 4e17b9a..d5de938 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -300,7 +300,12 @@ optimize_loop_nest_for_speed_p (struct loop *loop)
else if (l->next)
l = l->next;
else
- l = loop_outer (l);
+ {
+ while (l != loop && !l->next)
+ l = loop_outer (l);
+ if (l != loop)
+ l = l->next;
+ }
}
return false;
}