summaryrefslogtreecommitdiff
path: root/gcc/graphite-blocking.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/graphite-blocking.c')
-rw-r--r--gcc/graphite-blocking.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/graphite-blocking.c b/gcc/graphite-blocking.c
index b5f5acd74ba..e44ad8a921c 100644
--- a/gcc/graphite-blocking.c
+++ b/gcc/graphite-blocking.c
@@ -242,8 +242,9 @@ lst_do_strip_mine (lst_p lst)
for (i = 0; VEC_iterate (lst_p, LST_SEQ (lst), i, l); i++)
res |= lst_do_strip_mine (l);
- if (pbb_strip_mine_profitable_p (LST_PBB (lst_find_first_pbb (lst)),
- lst_depth (lst), stride))
+ if (lst_depth (lst) >= 0
+ && pbb_strip_mine_profitable_p (LST_PBB (lst_find_first_pbb (lst)),
+ lst_depth (lst), stride))
{
res |= lst_do_strip_mine_loop (lst, lst_depth (lst));
lst_add_loop_under_loop (lst);