[Mlir-commits] [mlir] 2f0e50c - [mlir] Fix build of toyc-ch6 (NFC)
Jeff Niu
llvmlistbot at llvm.org
Tue Aug 9 12:58:57 PDT 2022
Author: Jeff Niu
Date: 2022-08-09T15:58:49-04:00
New Revision: 2f0e50c69b52790eb8ac7d0c275702076d1f7408
URL: https://github.com/llvm/llvm-project/commit/2f0e50c69b52790eb8ac7d0c275702076d1f7408
DIFF: https://github.com/llvm/llvm-project/commit/2f0e50c69b52790eb8ac7d0c275702076d1f7408.diff
LOG: [mlir] Fix build of toyc-ch6 (NFC)
Added:
Modified:
mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
Removed:
################################################################################
diff --git a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
index 85c914a7fc07..6dfcb9f9297a 100644
--- a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
+++ b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
@@ -156,6 +156,7 @@ class PrintOpLowering : public ConversionPattern {
Value globalPtr = builder.create<LLVM::AddressOfOp>(loc, global);
Value cst0 = builder.create<LLVM::ConstantOp>(loc, builder.getI64Type(),
builder.getIndexAttr(0));
+ return builder.create<LLVM::GEPOp>(
loc,
LLVM::LLVMPointerType::get(IntegerType::get(builder.getContext(), 8)),
globalPtr, ArrayRef<Value>({cst0, cst0}));
More information about the Mlir-commits
mailing list