[Mlir-commits] [mlir] [mlir] Fix correct memset range in `OwningMemRef` zero-init (PR #158200)
    Mehdi Amini 
    llvmlistbot at llvm.org
       
    Fri Sep 12 04:12:35 PDT 2025
    
    
  
================
@@ -174,9 +174,7 @@ class OwningMemRef {
            it != end; ++it)
         init(*it, it.getIndices());
     } else {
-      memset(descriptor.data, 0,
-             nElements * sizeof(T) +
-                 alignment.value_or(detail::nextPowerOf2(sizeof(T))));
+      memset(descriptor.data, 0, nElements * sizeof(T));
----------------
joker-eph wrote:
Why not if you'd like, but I was less ambitious and pointing that aligning the names to be self-consistent in this function was something that can easily be squeezed with this patch.
https://github.com/llvm/llvm-project/pull/158200
    
    
More information about the Mlir-commits
mailing list