[mlir][spirv] Fix runtime array stride when emulating bitwidth
authorLei Zhang <antiagainst@google.com>
Mon, 12 Apr 2021 21:08:22 +0000 (17:08 -0400)
committerLei Zhang <antiagainst@google.com>
Mon, 12 Apr 2021 21:13:33 +0000 (17:13 -0400)
commit23b8264b5255efdc7c87c189feab04520a1979d5
treedb8327ba68fe4d53e637c2bcf09a40f040c865a6
parented1734931aa9ac074b9430b9e643b0d0a67b3227
[mlir][spirv] Fix runtime array stride when emulating bitwidth

The stride should be calculated with the converted array element
type, not the original input type.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D100337
mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp
mlir/test/Conversion/StandardToSPIRV/std-types-to-spirv.mlir