From f359ba2fa911fd73bb5d22592c695ed5ab497b0e Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 24 Jan 2019 20:49:09 +0100 Subject: [PATCH] re PR tree-optimization/88964 (ICE in wide_int_to_tree_1, at tree.c:1561) PR tree-optimization/88964 * gimple-loop-interchange.cc (loop_cand::analyze_induction_var): Also punt if HONOR_SNANS (chrec). From-SVN: r268247 --- gcc/ChangeLog | 4 ++++ gcc/gimple-loop-interchange.cc | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7087ef1a4f5..03d1b335499 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2019-01-24 Jakub Jelinek + 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, diff --git a/gcc/gimple-loop-interchange.cc b/gcc/gimple-loop-interchange.cc index 1f0e49d3a00..b188ce86d5e 100644 --- a/gcc/gimple-loop-interchange.cc +++ b/gcc/gimple-loop-interchange.cc @@ -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; -- 2.30.2