[PATCH] D98378: [LSR] Fix crash in Phi node with EHPad block
Lorenz Brun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 14 17:27:13 PST 2021
lorenz added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:3457
+ llvm::Value *ExpectedValue = U;
+ for (unsigned int I = 0; I < PhiNode->getNumIncomingValues(); I++) {
+ if (PhiNode->getIncomingValue(I) == ExpectedValue) {
----------------
qcolombet wrote:
> Instead of iterating through all the incoming values, can we use `Use::getOperandNo` to only check the relevant one?
No, this won't work because this bug is specifically about handling cases where a single incoming value shows up multiple times from different basic blocks. It is necessary to look at all basic blocks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98378/new/
https://reviews.llvm.org/D98378
More information about the llvm-commits
mailing list