[llvm] [SCEV] Handle backedge-count logic for std::reverse like loops (PR #92560)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 10:34:53 PDT 2024
hiraditya wrote:
> > > Then number of iterations will be (right_start - left_start)/(s1-(-s2)).
> >
> >
> > What is the number of iterations when s1+s2 can't exactly divide (right_start - left_start)? It might be a `(right_start - left_start)/(s1-(-s2)) + 1`
>
> In the code, backedge count is calculated as ceil((End - left_start) /u (s1- (-s2)) where, End = max(left_start, right_start).
Yeah i figured, but the comment was misleading. Thanks for fixing the commit message.
https://github.com/llvm/llvm-project/pull/92560
More information about the llvm-commits
mailing list