[clang] [llvm] [BasicAA] Do not decompose past casts with different index width (PR #119365)

Björn Pettersson via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 00:37:58 PST 2025


bjope wrote:

But isn't it still a bit weird that if I change the datalayout to set the same pointer size for the two address spaces, then BasicAA is able to derive that there is NoAlias (https://godbolt.org/z/vhcG4jx7a), and the same goes even if using same address space for both accesses (https://godbolt.org/z/GoEM7zx68).

So this patch kind of messed things up for targets that have multiple address spaces, but with different pointer sizes, since the early out for "index size mismatch" is making it skip some checks that could help identify NoAlias.

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


More information about the llvm-commits mailing list