[PATCH] D146429: [LSR] Fix wrapping bug in lsr-term-fold logic
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 20 11:13:59 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6789
+ if (NoOverflowBitWidth > ARBitWidth)
+ return nullptr;
+
----------------
Hm, can't we do something like check the nowrap (as in `<nw>`) flag on the post-inc addrec here?
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6799
AddRec->getOperand(1)->getType())),
AddRec->getOperand(0)->getType()));
const DataLayout &DL = L->getHeader()->getModule()->getDataLayout();
----------------
Side note, but this code looks like `evaluateAtIteration()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146429/new/
https://reviews.llvm.org/D146429
More information about the llvm-commits
mailing list