]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
more SCEV cache clearing
authorRichard Biener <rguenther@suse.de>
Wed, 29 Jul 2020 10:30:59 +0000 (12:30 +0200)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:20:03 +0000 (13:20 -0300)
This fixes two more places, in loop interchange and in the
vectorizer where the SCEV verifier sees stale entries.

2020-07-29  Richard Biener  <rguenther@suse.de>

* tree-vectorizer.c (vectorize_loops): Reset the SCEV
cache if we removed any SIMD UID SSA defs.
* gimple-loop-interchange.cc (pass_linterchange::execute):
Reset the scev cache if we interchanged a loop.

gcc/gimple-loop-interchange.cc
gcc/tree-vectorizer.c

index 2379848808f4069ca9951e4c06fa6e03d7a8beec..1656004ecf0b6bc325069675f9724fde8a9fb8a9 100644 (file)
@@ -2084,6 +2084,8 @@ pass_linterchange::execute (function *fun)
       loop_nest.release ();
     }
 
+  if (changed_p)
+    scev_reset ();
   return changed_p ? (TODO_update_ssa_only_virtuals) : 0;
 }
 
index 26a184696aa48cba95ae9d848f5e539a5af2aff6..2a60d37bb8773f2f035bbcb7b0d478e0a0a1cccf 100644 (file)
@@ -1283,7 +1283,11 @@ vectorize_loops (void)
 
   /* Fold IFN_GOMP_SIMD_{VF,LANE,LAST_LANE,ORDERED_{START,END}} builtins.  */
   if (cfun->has_simduid_loops)
-    adjust_simduid_builtins (simduid_to_vf_htab);
+    {
+      adjust_simduid_builtins (simduid_to_vf_htab);
+      /* Avoid stale SCEV cache entries for the SIMD_LANE defs.  */
+      scev_reset ();
+    }
 
   /* Shrink any "omp array simd" temporary arrays to the
      actual vectorization factors.  */