[llvm-branch-commits] [mlir] [mlir][memref] Remove runtime verification for `memref.reinterpret_cast` (PR #132547)
Matthias Springer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 25 02:18:25 PDT 2025
matthias-springer wrote:
> I think this is OK, but when we create a new memref, dont we want to verify that the strides specified dont make it such that accessing using strides goes out of bounds?
By "create a new memref" you mean the reinterpret_cast result, right? I'd say you don't want to verify this. Maybe you know that the source memref is a view into a larger allocation, so out-of-bounds access is safe. I think of it like a C++ reinterpret_cast, there you can cast to almost an arbitrary memref type.
https://github.com/llvm/llvm-project/pull/132547
More information about the llvm-branch-commits
mailing list