[clang] [clang] Add nuw attribute to GEPs (PR #105496)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 07:04:44 PDT 2024


nikic wrote:

@mikaelholmen Thanks for the reproducer, this makes the issue clear. BasicAA is incorrectly returning NoAlias for the pointers due to https://github.com/llvm/llvm-project/pull/98608.

The issue is that the `add` gets decomposed, but we preserve the nuw flag, effectively making it an `add nuw i16 n, -1`.

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


More information about the cfe-commits mailing list