[llvm] [NewGVN] Relax conditions when checking safety of memory accesses (PR #98609)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 10 03:31:50 PDT 2024


================
@@ -2597,34 +2597,61 @@ bool NewGVN::OpIsSafeForPHIOfOps(Value *V, const BasicBlock *PHIBlock,
   Worklist.push_back(V);
   while (!Worklist.empty()) {
     auto *I = Worklist.pop_back_val();
-    if (!isa<Instruction>(I))
+    if (!(isa<Instruction>(I) || isa<MemoryAccess>(I)))
----------------
ManuelJBrito wrote:

I have updated the PR so that the only MemoryAccesses in the worklist are MemoryPhis.

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


More information about the llvm-commits mailing list