The previous lowering would crash in this case as memref.view op does not support a non-identity result memref. This PR fixes the lowering by first creating a view into a buffer with enough elements to support a given layout (i.e. includes padding) before reinterpret_casting to the original layout of the alloca.
The previous lowering would crash in this case as
memref.view
op does not support a non-identity resultmemref
. This PR fixes the lowering by first creating aview
into a buffer with enough elements to support a given layout (i.e. includes padding) beforereinterpret_cast
ing to the original layout of thealloca
.