[Mlir-commits] [mlir] [mlir] Fix correct memset range in `OwningMemRef` zero-init (PR #158200)
Mehdi Amini
llvmlistbot at llvm.org
Fri Sep 12 01:20:58 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:
I suspect the confusion comes from `auto [data, alignedData] =` which should probably be `auto [allocatedPtr, alignedData] =` ... Can you update it line 167?
https://github.com/llvm/llvm-project/pull/158200
More information about the Mlir-commits
mailing list