[Mlir-commits] [mlir] [mlir][LLVM] Use int32_t to indirectly construct GEPArg (PR #79562)

Christian Ulmann llvmlistbot at llvm.org
Fri Jan 26 02:25:00 PST 2024


================
@@ -524,9 +525,9 @@ static void splitIntegerStore(const DataLayout &dataLayout, Location loc,
 
     // We create an `i8` indexed GEP here as that is the easiest (offset is
     // already known). Other patterns turn this into a type-consistent GEP.
-    auto gepOp =
-        rewriter.create<GEPOp>(loc, address.getType(), rewriter.getI8Type(),
-                               address, ArrayRef<GEPArg>{currentOffset});
+    auto gepOp = rewriter.create<GEPOp>(
+        loc, address.getType(), rewriter.getI8Type(), address,
+        ArrayRef<GEPArg>{static_cast<int32_t>(currentOffset)});
----------------
Dinistro wrote:

Nit: It might be easier to just change the type of `currentOffset`, or even the `storeOffset` parameter.

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


More information about the Mlir-commits mailing list