[Mlir-commits] [mlir] [memref] Support non-scalar copies in `reinterpret_cast` elision (PR #203873)

Andrzej WarzyƄski llvmlistbot at llvm.org
Mon Jun 29 01:02:40 PDT 2026


================

----------------
banach-space wrote:

This test is similar to `@copy_scalar_into_1D_strided_zero_offset`, but the destination is a "scalar" (a rank-0 MemRef). If you rename it like this, you will make that distinction very clear:
```suggestion
func.func private @copy_scalar_into_0D_strided_zero_offset(%src : memref<f32>, %dst : memref<f32>) 
```

In particular, please avoid mixing different naming schemes for source:
* "scalar" vs "0D'. 

In an **abstract** sense, all of these are scalars:
* `f32` vs `memref<f32>` vs `memref<1xf32>` vs `memref<1x1x1xf32>`

If you use "scalar" for source like this: `memref<1x1xf32>`, the please use is consistently throughout. Consistently is key.

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


More information about the Mlir-commits mailing list