[llvm] [AMDGPU][LowerBufferFatPointers] Fix lack of rewrite when loading/storing null (PR #154128)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 18 07:56:11 PDT 2025


================
@@ -2366,8 +2366,12 @@ static bool containsBufferFatPointers(const Function &F,
                                       BufferFatPtrToStructTypeMap *TypeMap) {
   bool HasFatPointers = false;
   for (const BasicBlock &BB : F)
-    for (const Instruction &I : BB)
+    for (const Instruction &I : BB) {
       HasFatPointers |= (I.getType() != TypeMap->remapType(I.getType()));
+      // Catch null pointer constasts in loads, stores, etc.
----------------
nikic wrote:

```suggestion
      // Catch null pointer constants in loads, stores, etc.
```

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


More information about the llvm-commits mailing list