[Mlir-commits] [mlir] Fix argument name of GEPOp builder (PR #74810)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Dec 7 22:30:49 PST 2023


https://github.com/xiaoleis-nv created https://github.com/llvm/llvm-project/pull/74810

This MR fix the argument name of GEPOp builder from `basePtrType` to `elementType` to avoid confusion.

>From 81f2324f9c93e18c5de143af811ccfdb807a6a70 Mon Sep 17 00:00:00 2001
From: Xiaolei Shi <xiaoleis at nvidia.com>
Date: Fri, 8 Dec 2023 14:24:05 +0800
Subject: [PATCH] change basePtrType to elementType

---
 mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
index 88d9cd2c71c0c..d7690b84807f6 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
@@ -284,10 +284,10 @@ def LLVM_GEPOp : LLVM_Op<"getelementptr", [Pure,
   }];
 
   let builders = [
-    OpBuilder<(ins "Type":$resultType, "Type":$basePtrType, "Value":$basePtr,
+    OpBuilder<(ins "Type":$resultType, "Type":$elementType, "Value":$basePtr,
                "ValueRange":$indices, CArg<"bool", "false">:$inbounds,
                CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>,
-    OpBuilder<(ins "Type":$resultType, "Type":$basePtrType, "Value":$basePtr,
+    OpBuilder<(ins "Type":$resultType, "Type":$elementType, "Value":$basePtr,
                "ArrayRef<GEPArg>":$indices, CArg<"bool", "false">:$inbounds,
                CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>,
   ];



More information about the Mlir-commits mailing list