[PATCH] D48283: [SCEV] Properly solve quadratic equations
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 20 14:42:15 PDT 2018
kparzysz added inline comments.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:10710
+ return UpperValid ? SE.getConstant(SU.getValue())
+ : SE.getConstant(SL.getValue());
+
----------------
efriedma wrote:
> I'm not convinced this is correct: why is the "valid" solution guaranteed to be smaller?
Are you referring to line 10720? Because it's the number of iterations. Both solutions are positive and both are validated as leaving the range, so the smaller one will happen first.
Repository:
rL LLVM
https://reviews.llvm.org/D48283
More information about the llvm-commits
mailing list