[PATCH] D72436: [SCEV] get a more accurate range for AddRecExpr with nsw flag
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 07:43:36 PST 2020
shchenz added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:5675
bool AllNonPos = true;
for (unsigned i = 0, e = AddRec->getNumOperands(); i != e; ++i) {
if (!isKnownNonNegative(AddRec->getOperand(i))) AllNonNeg = false;
----------------
nikic wrote:
> With the new code, we can skip operand zero (start) here. We only need that the step operands have a known sign so the addrec moves in a known direction, but the sign of the start value doesn't matter.
Good point.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72436/new/
https://reviews.llvm.org/D72436
More information about the llvm-commits
mailing list