[llvm] [AA][ScopedNoAliasAA] Returns ModRef when an alias exists (PR #70159)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 00:44:56 PDT 2023


https://github.com/nikic requested changes to this pull request.

It's sufficient to have !noalias on one instruction and !alias.scope on the other. You don't need both of them to have !noalias and !alias.scope.

See https://llvm.org/docs/LangRef.html#noalias-and-alias-scope-metadata for documentation and in particular:

> When evaluating an aliasing query, if for some domain, the set of scopes with that domain in one instruction’s alias.scope list is a subset of (or equal to) the set of scopes for that domain in another instruction’s noalias list, then the two memory accesses are assumed not to alias.

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


More information about the llvm-commits mailing list