aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-niter.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r--gcc/tree-ssa-loop-niter.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 732e06a..182753c 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -2159,7 +2159,6 @@ loop_only_exit_p (const struct loop *loop, const_edge exit)
basic_block *body;
gimple_stmt_iterator bsi;
unsigned i;
- gimple *call;
if (exit != single_exit (loop))
return false;
@@ -2168,17 +2167,8 @@ loop_only_exit_p (const struct loop *loop, const_edge exit)
for (i = 0; i < loop->num_nodes; i++)
{
for (bsi = gsi_start_bb (body[i]); !gsi_end_p (bsi); gsi_next (&bsi))
- {
- call = gsi_stmt (bsi);
- if (gimple_code (call) != GIMPLE_CALL)
- continue;
-
- if (gimple_has_side_effects (call))
- {
- free (body);
- return false;
- }
- }
+ if (stmt_can_terminate_bb_p (gsi_stmt (bsi)))
+ return true;
}
free (body);