[PATCH] D132443: [LSR] Fold terminating condition to other IV when possible
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 10:59:09 PDT 2022
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6609
+ Value *TermCond = BI->getCondition();
+ if (!isa<ICmpInst>(TermCond) || !cast<ICmpInst>(TermCond)->isEquality())
+ return CantFold;
----------------
Looks like a negative test with different branch conditions is missing.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6670
+ for (PHINode &PN : L->getHeader()->phis()) {
+ if (!SE.isSCEVable(PN.getType()))
+ continue;
----------------
it looks like there's a negative test missing with types that aren't scev-able (e.g. vector types I think).
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6675
+ // Only speculate on affine AddRec
+ if (!AddRec || !AddRec->isAffine())
+ continue;
----------------
It looks like there's a test case missing where one of the phis isn't an AddRec/non-affine AddRec.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132443/new/
https://reviews.llvm.org/D132443
More information about the llvm-commits
mailing list