[ScalarEvolution] Refine computeMaxBECountForLT to be accurate in more cases.
authorEli Friedman <efriedma@quicinc.com>
Fri, 16 Jul 2021 23:21:20 +0000 (16:21 -0700)
committerEli Friedman <efriedma@quicinc.com>
Mon, 19 Jul 2021 22:43:30 +0000 (15:43 -0700)
commitde3ea51be4367367202da5f53ca4e39848d3ccf6
tree92a8bc360dd326a711ebe736bc6d645858e5c7e2
parent381c3b92997528404a7e39afe1353eaf6b6af924
[ScalarEvolution] Refine computeMaxBECountForLT to be accurate in more cases.

Allow arbitrary strides, and make sure we return the correct result when
the backedge-taken count is zero.

Differential Revision: https://reviews.llvm.org/D106197
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/max-trip-count.ll