[llvm] [GVN] Drop Clobber dependency if store may overwrite only the same value (PR #68322)

Sergey Kachkov via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 03:21:34 PDT 2023


================
@@ -577,6 +610,9 @@ MemDepResult MemoryDependenceResults::getSimplePointerDependencyFrom(
         return MemDepResult::getDef(Inst);
       if (isInvariantLoad)
         continue;
+      if (canSkipClobberingStore(SI, MemLoc, MemLocAlign, BatchAA,
+                                 getDefaultBlockScanLimit()))
----------------
skachkov-sc wrote:

Agreed, I've checked statistics on llvm-test-suite (gvn.NumGVNLoad, gvn.NumPRELoad) and seems that it will not cause any changes with this more conservative limit

https://github.com/llvm/llvm-project/pull/68322


More information about the llvm-commits mailing list