[Mlir-commits] [mlir] 27af6bc - [MLIR] fix LLVM::InsertValueOp::create

Maksim Levental llvmlistbot at llvm.org
Sun Sep 7 19:23:19 PDT 2025


Author: Maksim Levental
Date: 2025-09-07T22:23:12-04:00
New Revision: 27af6bc240a64bbf03d97976fe306b58101b8011

URL: https://github.com/llvm/llvm-project/commit/27af6bc240a64bbf03d97976fe306b58101b8011
DIFF: https://github.com/llvm/llvm-project/commit/27af6bc240a64bbf03d97976fe306b58101b8011.diff

LOG: [MLIR] fix LLVM::InsertValueOp::create

Added: 
    

Modified: 
    mlir/lib/Conversion/PtrToLLVM/PtrToLLVM.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/PtrToLLVM/PtrToLLVM.cpp b/mlir/lib/Conversion/PtrToLLVM/PtrToLLVM.cpp
index 29140e63f3af5..86106b27a2bd4 100644
--- a/mlir/lib/Conversion/PtrToLLVM/PtrToLLVM.cpp
+++ b/mlir/lib/Conversion/PtrToLLVM/PtrToLLVM.cpp
@@ -246,8 +246,9 @@ LogicalResult GetMetadataOpConversion::matchAndRewrite(
   Value sV = LLVM::UndefOp::create(rewriter, loc, *mdTy);
 
   // First element is the allocated pointer.
-  sV = LLVM::InsertValueOp::create(
-      rewriter, loc, sV, descriptor.allocatedPtr(rewriter, loc), int64_t{0});
+  SmallVector<int64_t> pos{0};
+  sV = LLVM::InsertValueOp::create(rewriter, loc, sV,
+                                   descriptor.allocatedPtr(rewriter, loc), pos);
 
   // Track the current field index.
   unsigned fieldIdx = 1;


        


More information about the Mlir-commits mailing list