aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-manip.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r--gcc/tree-ssa-loop-manip.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 30f8534..7611a6f 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -604,17 +604,6 @@ tree_duplicate_loop_to_header_edge (struct loop *loop, edge e,
return true;
}
-/* Build if (COND) goto THEN_LABEL; else goto ELSE_LABEL; */
-
-static tree
-build_if_stmt (tree cond, tree then_label, tree else_label)
-{
- return build3 (COND_EXPR, void_type_node,
- cond,
- build1 (GOTO_EXPR, void_type_node, then_label),
- build1 (GOTO_EXPR, void_type_node, else_label));
-}
-
/* Returns true if we can unroll LOOP FACTOR times. Number
of iterations of the loop is returned in NITER. */
@@ -932,9 +921,9 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor,
REG_BR_PROB_BASE - exit->probability);
bsi = bsi_last (exit_bb);
- exit_if = build_if_stmt (boolean_true_node,
- tree_block_label (loop->latch),
- tree_block_label (rest));
+ exit_if = build3 (COND_EXPR, void_type_node, boolean_true_node,
+ NULL_TREE, NULL_TREE);
+
bsi_insert_after (&bsi, exit_if, BSI_NEW_STMT);
new_exit = make_edge (exit_bb, rest, EDGE_FALSE_VALUE | irr);
rescan_loop_exit (new_exit, true, false);