[Mlir-commits] [mlir] [MLIR][ROCDL] Fix accessedOperands for Rocdl_RawPtrBufferLoadOp (PR #127983)

Alexander Weinrauch llvmlistbot at llvm.org
Thu Feb 20 02:14:27 PST 2025


https://github.com/AlexAUT created https://github.com/llvm/llvm-project/pull/127983

`getAccessedOperands` should return all accessed pointer operands. In the case for BufferLoads this is the source buffer and not the result.


>From 5dc05319f276bf05283ff4a6d37a1899932157d6 Mon Sep 17 00:00:00 2001
From: Alexander Weinrauch <alexander.weinrauch at amd.com>
Date: Thu, 20 Feb 2025 09:56:57 +0000
Subject: [PATCH] Fix accessedOperands for Rocdl_RawPtrBufferLoadOp

---
 mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td b/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
index e9dcd112ce54e..fd63745b850fb 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
@@ -470,7 +470,7 @@ def ROCDL_RawPtrBufferLoadOp :
   let assemblyFormat = "operands attr-dict `:` type($res)";
   let extraClassDefinition = [{
     ::llvm::SmallVector<::mlir::Value> $cppClass::getAccessedOperands() {
-      return {getRes()};
+      return {getRsrc()};
     }
   }];
 }



More information about the Mlir-commits mailing list