[Mlir-commits] [mlir] [mlir] Fix correct memset range in `OwningMemRef` zero-init (PR #158200)

Mehdi Amini llvmlistbot at llvm.org
Fri Sep 12 06:36:23 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:

Yes, that's align with what I had in mind.

https://github.com/llvm/llvm-project/pull/158200


More information about the Mlir-commits mailing list