[llvm] [LVI][SCCP] Avoid copying ValueLatticeElement (PR #163901)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 17 13:08:46 PDT 2025


================
@@ -1996,7 +1991,7 @@ void SCCPInstVisitor::handleCallArguments(CallBase &CB) {
                        getMaxWidenStepsOpts());
         }
       } else
-        mergeInValue(&*AI,
+        mergeInValue(ValueState[&*AI], &*AI,
----------------
nikic wrote:

This looks potentially unsafe, is `ValueState[&*AI]` guaranteed to already exist?

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


More information about the llvm-commits mailing list