[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:15:47 PDT 2024
mrdaybird 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 - Start) /u (Stride - RHSStride) where, End = max(RHSStart, Start).
https://github.com/llvm/llvm-project/pull/92560
More information about the llvm-commits
mailing list