[Mlir-commits] [mlir] [mlir][LLVM] Use int32_t to indirectly construct GEPArg (PR #79562)
Andrei Golubev
llvmlistbot at llvm.org
Fri Jan 26 03:38:31 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)});
----------------
andrey-golubev wrote:
it participates in other expressions involving `unsigned` values (e.g. as "accumulator" below) so figured the cast here is cleaner.
https://github.com/llvm/llvm-project/pull/79562
More information about the Mlir-commits
mailing list