Fix indexing issue in lowering of linalg.slice
authorNicolas Vasilache <ntv@google.com>
Tue, 13 Aug 2019 16:20:06 +0000 (09:20 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 13 Aug 2019 16:20:32 +0000 (09:20 -0700)
commitb09dfcb1d761fcf88ac80cfa98b7e39c45242286
tree285e17c142ccc20f241ab95c232b348337e3b329
parent5f0a843144289050844109f16693c86168135dac
Fix indexing issue in lowering of linalg.slice

This CL fixes the stepping through operands when emitting the view sizes of linalg.slice to LLVMIR. This is now consistent with the strides emission.

A relevant test is added.

Fix suggested by Alex Zinenko, thanks!

PiperOrigin-RevId: 263150922
mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
mlir/test/Linalg/llvm.mlir