[llvm] [SCEVDivision] Add SCEVDivisionPrinterPass with corresponding tests (PR #155832)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 28 07:15:56 PDT 2025
nikic wrote:
> While writing tests, I felt that we should first clarify the behavior of `SCEVDivision::divide`. Maybe something like the following?
>
> * Given the `Numerator` and `Denominator`, find a pair `(Quotient, Remainder)` such that
>
> * `Numerator = Quotient * Denominator + Remainder`
> * The multiplication of `Quotient` and `Denominator` does not wrap in a signed sense
> * The addition of `Quotient*Denominator` and `Remainder` does not wrap in a signed sense
It looks like the current implementation only follows the first point, but not the other two (no signed wrap). As long as Delinearization doesn't actually require these to not wrap, this behavior would be fine to keep...
https://github.com/llvm/llvm-project/pull/155832
More information about the llvm-commits
mailing list