aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-if-conv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r--gcc/tree-if-conv.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 80a53a8..8d5d226 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -1021,6 +1021,15 @@ insert_gimplified_predicates (loop_p loop)
basic_block bb = ifc_bbs[i];
gimple_seq stmts = bb_predicate_gimplified_stmts (bb);
+ if (!is_predicated (bb))
+ {
+ /* Do not insert statements for a basic block that is not
+ predicated. Also make sure that the predicate of the
+ basic block is set to true. */
+ reset_bb_predicate (bb);
+ continue;
+ }
+
if (stmts)
{
gimple_stmt_iterator gsi = gsi_last_bb (bb);