From 8119ebd57da976efb670afc5e4a42b66920005a3 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 17 Oct 2017 21:53:34 +0000 Subject: [PATCH] tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if the use statement can throw internally. * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if the use statement can throw internally. From-SVN: r253834 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-loop-ivopts.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 20b7b3f6e97..c8a4680cc68 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-10-17 Eric Botcazou + + * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if + the use statement can throw internally. + 2017-10-17 Eric Botcazou * config/visium/visium.c (visium_select_cc_mode): Return CCmode for diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 2a71027a1e2..737e393b7c7 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -3140,7 +3140,7 @@ add_autoinc_candidates (struct ivopts_data *data, tree base, tree step, statement. */ if (use_bb->loop_father != data->current_loop || !dominated_by_p (CDI_DOMINATORS, data->current_loop->latch, use_bb) - || stmt_could_throw_p (use->stmt) + || stmt_can_throw_internal (use->stmt) || !cst_and_fits_in_hwi (step)) return; -- 2.30.2