[SSAUpdater] Don't call ValueIsRAUWd upon single use replacement
authorDaniil Suchkov <suc-daniil@yandex.ru>
Tue, 21 Jan 2020 05:21:53 +0000 (12:21 +0700)
committerDaniil Suchkov <suc-daniil@yandex.ru>
Thu, 23 Jan 2020 08:53:53 +0000 (15:53 +0700)
commit4a8dbc617d0b28ce2ce3e6856376b3802409554e
treed327853c2a6074acb123363c9814f1a3be84eee0
parent8306f55bfa2b14ac4289c6f1d3ab5c4a64d37f6b
[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
llvm/lib/Transforms/Utils/SSAUpdater.cpp
llvm/test/Transforms/LCSSA/pr44320.ll