https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116290

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
We're finding one more BIV with -g due to

@@ -78,14 +78,7 @@
   (scalar = _32)
 (get_scalar_evolution 
   (scalar = _32)
-  (scalar_evolution = _32))
-)
-(analyze_scalar_evolution 
-  (loop_nb = 1)
-  (scalar = _32)
-(get_scalar_evolution 
-  (scalar = _32)
-  (scalar_evolution = _32))
+  (scalar_evolution = {_28, +, 1}_1))
 )

that's actually a stale cache - calling scev_reset () at the start of IVOPTs
fixes the compare-debug issue.

-fdisable-tree-ldist avoids the issue.

Oddly enough there's no IL difference between ivcanon (before ldist) and
slp1.  IVCANON calls scev_reset () unconditionally at the end.

Ah, found it and testing fix.

diff --git a/gcc/tree-loop-distribution.cc b/gcc/tree-loop-distribution.cc
index f0430ede2f4..d7013ba5f8d 100644
--- a/gcc/tree-loop-distribution.cc
+++ b/gcc/tree-loop-distribution.cc
@@ -3565,8 +3565,8 @@ determine_reduction_stmt_1 (const loop_p loop, const
basic_block *bbs)
            }
        }

-      for (gimple_stmt_iterator bsi = gsi_start_bb (bb); !gsi_end_p (bsi);
-          gsi_next_nondebug (&bsi), ++ninsns)
+      for (gimple_stmt_iterator bsi = gsi_start_nondebug_bb (bb);
+          !gsi_end_p (bsi); gsi_next_nondebug (&bsi), ++ninsns)
        {
          /* Bail out early for loops which are unlikely to match.  */
          if (ninsns > 16)
  • [Bug middle-end/116290] [12/13/... rguenth at gcc dot gnu.org via Gcc-bugs

Reply via email to