[llvm] [GVN] Track visited nodes in equality propagation to avoid OOM (PR #212265)

Sven van Haastregt via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 06:44:42 PDT 2026


================
@@ -3118,6 +3119,9 @@ bool GVNPass::propagateEquality(
     if (isa<Constant>(LHS) && isa<Constant>(RHS))
       continue;
 
+    if (!Visited.insert({LHS, RHS}).second)
----------------
svenvh wrote:

Thanks; moved this to after the two swaps, the pair should be fully canonicalized at this point.

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


More information about the llvm-commits mailing list