[mlir][VectorOps] Implement strided_slice conversion
authorNicolas Vasilache <ntv@google.com>
Thu, 9 Jan 2020 07:58:21 +0000 (02:58 -0500)
committerNicolas Vasilache <ntv@google.com>
Thu, 9 Jan 2020 08:03:51 +0000 (03:03 -0500)
commit65678d938431c90408afa8d255cbed3d8ed8273f
treef5efc92f66b1e1954236faa26c9c1fdf4dead892
parent24b326cc610dfdccdd50bc78505ec228d96c8e7a
[mlir][VectorOps] Implement strided_slice conversion

Summary:
This diff implements the progressive lowering of strided_slice to either:
  1. extractelement + insertelement for the 1-D case
  2. extract + optional strided_slice + insert for the n-D case.

This combines properly with the other conversion patterns to lower all the way to LLVM.

Appropriate tests are added.

Reviewers: ftynse, rriddle, AlexEichenberger, andydavis1, tetuante

Reviewed By: andydavis1

Subscribers: merge_guards_bot, mehdi_amini, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72310
mlir/include/mlir/IR/Attributes.h
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir