Skip to content

Commit 27af6bc

Browse files
committed
[MLIR] fix LLVM::InsertValueOp::create
1 parent 2ec6b3b commit 27af6bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mlir/lib/Conversion/PtrToLLVM/PtrToLLVM.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,9 @@ LogicalResult GetMetadataOpConversion::matchAndRewrite(
246246
Value sV = LLVM::UndefOp::create(rewriter, loc, *mdTy);
247247

248248
// First element is the allocated pointer.
249-
sV = LLVM::InsertValueOp::create(
250-
rewriter, loc, sV, descriptor.allocatedPtr(rewriter, loc), int64_t{0});
249+
SmallVector<int64_t> pos{0};
250+
sV = LLVM::InsertValueOp::create(rewriter, loc, sV,
251+
descriptor.allocatedPtr(rewriter, loc), pos);
251252

252253
// Track the current field index.
253254
unsigned fieldIdx = 1;

0 commit comments

Comments
 (0)