[llvm] [NewGVN] Relax conditions when checking safety of memory accesses (PR #98609)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 05:19:04 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 tried something similar but ended up going with this version because I thought the code was easier to understand. I'll update the patch so you can decide which version you prefer.
https://github.com/llvm/llvm-project/pull/98609
More information about the llvm-commits
mailing list