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 7087ef1a4f5c79e77ae74be102eb68d52ac58c3e..03d1b3354999137009533c3a6da594cba4448371 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 1f0e49d3a006ff0164e780b0d382b477aa63f6ab..b188ce86d5e307d4f9f455e0caf74bf3b75bdca4 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;