std.alloc only supports memrefs with identity layout, which means we can simplify the lowering to LLVM and compute strides only from (static and dynamic) sizes.
Nit: could we also document that it emits instructions necessary to compute the strides and the total size?
This seems like it would properly support cases with vectors due to padding an alignment, e.g., memref<4 x vector<3 x f32>>, right?
It's a shame that clang-tidy doesn't format the goes-to operator correctly.
Yes, see for example the %t4 example here: https://llvm.org/docs/LangRef.html#getelementptr-instruction