diff options
author | Jeff Niu <jeff@modular.com> | 2022-08-09 15:58:49 -0400 |
---|---|---|
committer | Jeff Niu <jeff@modular.com> | 2022-08-09 15:58:49 -0400 |
commit | 2f0e50c69b52790eb8ac7d0c275702076d1f7408 (patch) | |
tree | 3a77aadd7dd8026d6785fafcea5c5ebcc6817e6f /mlir/examples | |
parent | 0c86fbb557a63d2e9cc2e1a82feb38fe11ecbcdd (diff) | |
download | llvm-2f0e50c69b52790eb8ac7d0c275702076d1f7408.zip llvm-2f0e50c69b52790eb8ac7d0c275702076d1f7408.tar.gz llvm-2f0e50c69b52790eb8ac7d0c275702076d1f7408.tar.bz2 |
[mlir] Fix build of toyc-ch6 (NFC)
Diffstat (limited to 'mlir/examples')
-rw-r--r-- | mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp index 85c914a..6dfcb9f 100644 --- a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp +++ b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp @@ -156,6 +156,7 @@ private: 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})); |