[PATCH] D146811: [LSR] Preserve LCSSA when rewriting instruction with PHI user
Dmitry Makogon via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 01:34:13 PDT 2023
dmakogon added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5540
SmallVectorImpl<WeakTrackingVH> &DeadInsts) const {
DenseMap<BasicBlock *, Value *> Inserted;
for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
----------------
mkazantsev wrote:
> I'm curious, is it possible that second value here is *not* an instruction? Might be a good NFC change beforehand.
Yes, it's possible. LSR uses SCEVExpander here. There are case where it expands the expression to constants.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146811/new/
https://reviews.llvm.org/D146811
More information about the llvm-commits
mailing list