tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if the use statement...
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 17 Oct 2017 21:53:34 +0000 (21:53 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 17 Oct 2017 21:53:34 +0000 (21:53 +0000)
* tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
the use statement can throw internally.

From-SVN: r253834

gcc/ChangeLog
gcc/tree-ssa-loop-ivopts.c

index 20b7b3f6e9748e04b491ff6577087ad4b2247fc1..c8a4680cc683044d50b9e248dbd16da1196abb38 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
+       the use statement can throw internally.
+
 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
 
        * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
index 2a71027a1e2ccaefba1e231420200dec58255956..737e393b7c76eea88c7fdd2034aba30025ef4afd 100644 (file)
@@ -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;