[llvm] [DA] Fix overflow of findBounds* in BanerjeeTest (PR #191232)

Ruoyu Qiu via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 02:40:45 PDT 2026


cabbaken wrote:

Thank you for the information.

> Assuming we decide to retain it and fix its defects, I think we should do a full rewrite at some point. The current implementation is legacy code, and it feels like a kind of technical debt.

Agree. The current implementation looks to be completely based on the formula. I tried to make some fixes, but they always fail to meet expectations. Maybe a fully rewrite is better.

> The Banerjee MIV test has several things that are still unclear. If you are interested in correcting it, I'd recommend taking the time to read through the code carefully before you start making changes.

Make sense. Before modifying the implementation, I will focus on adding regression tests to demonstrate if the Banerjee MIV test is necessary.

> It turned out that simply checking the no-wrap flags of the addrecs, as the other dependence tests do, is insufficient for this case.

Of course, this patch is not meant to add some no-wrap flags to fix Banerjee test. This patch is just for starting a discussion around Banerjee test.

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


More information about the llvm-commits mailing list