[Mlir-commits] [mlir] [mlir][EmitC]Expand the MemRefToEmitC pass - Lowering `AllocOp` (PR #148257)
    Paul Kirth 
    llvmlistbot at llvm.org
       
    Fri Jul 25 10:07:30 PDT 2025
    
    
  
================
@@ -107,31 +107,29 @@ struct ConvertAlloc final : public OpConversionPattern<memref::AllocOp> {
                                  {mlir::TypeAttr::get(elementType)}));
     mlir::Value sizeofElement = sizeofElementOp.getResult(0);
 
-    unsigned int elementWidth = elementType.getIntOrFloatBitWidth();
-    IntegerAttr indexAttr = rewriter.getIndexAttr(elementWidth);
+    long val = memrefType.getShape().front();
----------------
ilovepi wrote:
Why is this a `long`? Isn't the type returned from `getShape()` an `ArrayRef<int64_t>`?
https://github.com/llvm/llvm-project/pull/148257
    
    
More information about the Mlir-commits
mailing list