[PATCH] D28393: [SCEV] Make howFarToZero produce a smaller max backedge-taken count
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 13:52:40 PST 2017
sanjoy added inline comments.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:7219
+ ConstantRange CR = getUnsignedRange(DistancePlusOne);
+ APInt NewMaxBECount = CR.getUnsignedMax() - One->getAPInt();
+ if (NewMaxBECount.ult(MaxBECount))
----------------
sanjoy wrote:
> Why are you checking `(Distance + 1) != 0` instead of `Distance != -1`? I'd find the latter more straightforward.
In case I gave the wrong impression, I don't specifically care about checking `(Distance + 1) != 0` vs. `Distance != -1`. If you find the former more straightforward, then I'm okay too.
https://reviews.llvm.org/D28393
More information about the llvm-commits
mailing list