[llvm] [LAA] Be more careful when evaluating AddRecs at symbolic max BTC. (PR #128061)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 20 11:55:42 PDT 2025


annamthomas wrote:

@fhahn, to clarify my understanding here: this patch is to prevent incorrect runtime checks from being generated when we the last access address may overflow. If the last access overflows, this is in fact UB. However, for early exit loops, in such cases, we may not have a UB in the original program (since we may early exit) but we end up generating incorrect runtime checks when vectorizing. 
For regular loops, such a case (last access overflows) is a UB, so it does not matter that we are generating an incorrect runtime check.

If this is only to prevent incorrect runtime checks, we technically need to check this only for loops that need runtime checks? 

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


More information about the llvm-commits mailing list