[llvm] [DA] Rewrite BanerjeeMIV test with safe APInt interval arithmetic (PR #207662)
Ehsan Amiri via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 09:12:24 PDT 2026
amehsan wrote:
> I feel this implementation is a bit flaky. I think it would be better to introduce a mechanism such as dynamic-sized integer (or SCEV). For example, the addition of `x` with type `ty0` and `y` with type `ty1` is an integer with type `max(ty0, ty1) + 1`.
Let's don't make this overly complicated.
The current approach seems completely reasonable to me. We can check the sizes of integers invovled and also calculate what integer size we need to avoid overflow and then we can perform the computation in the wider size. Developing a new mechanism like dynamic-size integer is unnecessary.
For step (1) it makes more sense to stick to integers and postpone worrying about symbolic cases to future.
https://github.com/llvm/llvm-project/pull/207662
More information about the llvm-commits
mailing list