[llvm] [AMDGPU] Fix spurious NoAlias results (PR #122309)

Fraser Cormack via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 08:30:00 PST 2025


frasercrmck wrote:

I wasn't sure if the same fix needs done on the other case here:

``` cpp
    if (const LoadInst *LI = dyn_cast<LoadInst>(ObjA)) {
      // If a generic pointer is loaded from the constant address space, it
      // could only be a GLOBAL or CONSTANT one as that address space is solely
      // prepared on the host side, where only GLOBAL or CONSTANT variables are
      // visible. Note that this even holds for regular functions.
      if (LI->getPointerAddressSpace() == AMDGPUAS::CONSTANT_ADDRESS)
        return AliasResult::NoAlias;
```

or whether the comment can be relied upon. I thought I'd defer it to the PR discussion.

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


More information about the llvm-commits mailing list