Skip to content

Commit 4a8dbc6

Browse files
committed
[SSAUpdater] Don't call ValueIsRAUWd upon single use replacement
It is incorrect to call ValueHandleBase::ValueIsRAUWd when only one use is replaced since it simply violates semantics of the callback and leads to bugs like PR44320. Previously this call was used specifically to keep LICM's cache of AliasSetTrackers up to date across passes (as PR36801 showed, even for that purpose it didn't work properly), but since LICM doesn't have that cache anymore, we can safely remove this incorrect call with no repercussions. This patch fixes https://bugs.llvm.org/show_bug.cgi?id=44320 Reviewers: asbirlea, fhahn, efriedma, reames Reviewed-By: asbirlea Differential Revision: https://reviews.llvm.org/D73089
1 parent 8306f55 commit 4a8dbc6

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

llvm/lib/Transforms/Utils/SSAUpdater.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,6 @@ void SSAUpdater::RewriteUse(Use &U) {
195195
else
196196
V = GetValueInMiddleOfBlock(User->getParent());
197197

198-
// Notify that users of the existing value that it is being replaced.
199-
Value *OldVal = U.get();
200-
if (OldVal != V && OldVal->hasValueHandle())
201-
ValueHandleBase::ValueIsRAUWd(OldVal, V);
202-
203198
U.set(V);
204199
}
205200

llvm/test/Transforms/LCSSA/pr44320.ll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
; XFAIL: *
21
; RUN: opt -passes="verify<scalar-evolution>,lcssa,verify<scalar-evolution>" -verify-scev-strict -S -disable-output %s
32

43
; The first SCEV verification is required because it queries SCEV and populates

0 commit comments

Comments
 (0)