[llvm] [CorrelatedValuePropagation] Drop stale debug records on context-only rewrites (PR #218498)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 24 20:12:42 PDT 2026
================
@@ -1111,6 +1116,10 @@ static bool processAShr(BinaryOperator *SDI, LazyValueInfo *LVI) {
BO->takeName(SDI);
BO->setDebugLoc(SDI->getDebugLoc());
BO->setIsExact(SDI->isExact());
+ // The replacement is equivalent only where LVI proved the operand
+ // non-negative. Debug records may be observed outside that range, where an
+ // arithmetic and logical shift have different values.
+ SDI->dropDbgRecords();
----------------
MrEven132 wrote:
Same as R821.
https://github.com/llvm/llvm-project/pull/218498
More information about the llvm-commits
mailing list