[mlir] [VectorOps] Implement vector.create_mask lowering to LLVM IR
authoraartbik <ajcbik@google.com>
Thu, 14 May 2020 19:03:43 +0000 (12:03 -0700)
committeraartbik <ajcbik@google.com>
Fri, 15 May 2020 18:02:30 +0000 (11:02 -0700)
commitb1c688dbae696e30ae5fb22677bfbfa255117f9f
tree7504c2bc5ecbb94c3c3f32dd306aba4e4c1e213e
parenta76055322209f139a91712a88b5c403021bb7d1f
[mlir] [VectorOps] Implement vector.create_mask lowering to LLVM IR

Summary:
First, compact implementation of lowering to LLVM IR. A bit more
challenging than the constant mask due to the dynamic indices, of course.
I like to hear if there are more efficient ways of doing this in LLVM,
but this for now at least gives us a functional reference implementation.

Reviewers: nicolasvasilache, ftynse, bkramer, reidtatge, andydavis1, mehdi_amini

Reviewed By: nicolasvasilache

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79954
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
mlir/lib/Dialect/Vector/VectorTransforms.cpp
mlir/test/Dialect/Vector/vector-contract-transforms.mlir
mlir/test/Target/vector-to-llvm-ir.mlir