[llvm] Fix exact backedge count algorithm in Scalar-Evolution (PR #92560)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 07:57:19 PDT 2024


mrdaybird wrote:

I had a few queries:
1. What is the need of `howManyGreaterThans`, can we not reuse `howManyLessThans` to do the same computations?
2. The comment in [line 9198](https://github.com/llvm/llvm-project/blob/9b6f0735fbff4e9a51f0c76f5630be649490f6ef/llvm/lib/Analysis/ScalarEvolution.cpp#L9198) mentions that RHS cannot include boundary value. Is this still true if the RHS is an add-recurrence? For example, consider that LHS is a increasing recurrence and RHS is decreasing recurrence.

@nikic @fhahn 


https://github.com/llvm/llvm-project/pull/92560


More information about the llvm-commits mailing list