re PR tree-optimization/88964 (ICE in wide_int_to_tree_1, at tree.c:1561)
authorJakub Jelinek <jakub@redhat.com>
Thu, 24 Jan 2019 19:49:09 +0000 (20:49 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 24 Jan 2019 19:49:09 +0000 (20:49 +0100)
PR tree-optimization/88964
* gimple-loop-interchange.cc (loop_cand::analyze_induction_var): Also
punt if HONOR_SNANS (chrec).

From-SVN: r268247

gcc/ChangeLog
gcc/gimple-loop-interchange.cc

index 7087ef1..03d1b33 100644 (file)
@@ -1,5 +1,9 @@
 2019-01-24  Jakub Jelinek  <jakub@redhat.com>
 
+       PR tree-optimization/88964
+       * gimple-loop-interchange.cc (loop_cand::analyze_induction_var): Also
+       punt if HONOR_SNANS (chrec).
+
        PR middle-end/89015
        * tree-nested.c (convert_nonlocal_reference_stmt,
        convert_local_reference_stmt, convert_tramp_reference_stmt,
index 1f0e49d..b188ce8 100644 (file)
@@ -690,8 +690,8 @@ loop_cand::analyze_induction_var (tree var, tree chrec)
     {
       /* Punt on floating point invariants if honoring signed zeros,
         representing that as + 0.0 would change the result if init
-        is -0.0.  */
-      if (HONOR_SIGNED_ZEROS (chrec))
+        is -0.0.  Similarly for SNaNs it can raise exception.  */
+      if (HONOR_SIGNED_ZEROS (chrec) || HONOR_SNANS (chrec))
        return false;
       struct induction *iv = XCNEW (struct induction);
       iv->var = var;