[llvm] [DA] Add initial support for monotonicity check (PR #162280)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 17 10:08:55 PDT 2025


kasuga-fj wrote:

> I don't have objections to merging this patch. This works well if effective pointer size is 32 or 64. But I think this issue needs to be discussed further, independent of this patch (for example, I suspect we can write test cases that are vectorized but they are not legal, and it is question for me how important is to fix all these unlikely corner cases -- EDIT: in particular could this kind of bug be a security issue?).

I'm not sure if this answers your question, but you might want to take a look at [LangRef](https://llvm.org/docs/LangRef.html#getelementptr-instruction) for details on how address calculations are interpreted in LLVM. I'm also not entirely sure, but it might be true that we should pay a bit more attention to the pointer index type, which should be able to get from functions like `DataLayout::getIndexType`.

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


More information about the llvm-commits mailing list