[llvm] [BasicAA] Extend two-variable MinAbsVarIndex heuristic to different scales (PR #218639)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 05:11:36 PDT 2026


antoniofrighetto wrote:

> Can you please add a generalized proof?

Added a more generalized proof (https://alive2.llvm.org/ce/z/RC4LwD), though limited to showing that the two quotient offsets (q0, q1) are distinct for 1-byte accesses (`q0 != q1`). By arithmetic, we have that `abs(q0 − q1) >= 1`, which implies `abs(Offset0 − Offset1) >= G` for some positive factor G (the GCD happens to be the optimal one).

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


More information about the llvm-commits mailing list