From a378e92255a31d26d0905e72de1abd91a161f758 Mon Sep 17 00:00:00 2001 From: Aditya Kumar Date: Thu, 19 Nov 2015 23:06:18 +0000 Subject: fix PR68428: ignore bb dominated by the scop->exit Co-Authored-By: Sebastian Pop From-SVN: r230632 --- gcc/graphite-scop-detection.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/graphite-scop-detection.c') diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index e42b9bf..84fe945 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -1062,12 +1062,16 @@ scop_detection::harmful_stmt_in_region (sese_l scop) const basic_block bb; FOR_EACH_VEC_ELT (dom, i, bb) { - DEBUG_PRINT (dp << "\nVisiting bb_" << bb->index); + DEBUG_PRINT (dp << "Visiting bb_" << bb->index << "\n"); /* We don't want to analyze any bb outside sese. */ if (!dominated_by_p (CDI_POST_DOMINATORS, bb, exit_bb)) continue; + /* Basic blocks dominated by the scop->exit are not in the scop. */ + if (bb != exit_bb && dominated_by_p (CDI_DOMINATORS, bb, exit_bb)) + continue; + /* The basic block should not be part of an irreducible loop. */ if (bb->flags & BB_IRREDUCIBLE_LOOP) { -- cgit v1.1