[mlir] Convert std.and/std.or ops to spv.LogicalAnd/spv.LogicalOr
authorMaheshRavishankar <ravishankarm@google.com>
Thu, 26 Dec 2019 00:29:17 +0000 (16:29 -0800)
committerMaheshRavishankar <ravishankarm@google.com>
Fri, 27 Dec 2019 19:33:17 +0000 (11:33 -0800)
commitc3d3569d4ca6d8ca85fa0755b3d5bd659d81e758
tree65f5d15d60e6f589d2073bd8fb64caa0a852c2b2
parentef7a659c21fb28b20a49912c2bc47b7af6637f85
[mlir] Convert std.and/std.or ops to spv.LogicalAnd/spv.LogicalOr

The conversion from std.and/std.or to spv.LogicalAnd/spv.LogicalOr is
only valid for boolean (i1) types. Modify BinaryOpPattern in
StandardToSPIRV.td to allow limiting the type of the operands for
which the pattern is applied.

Differential Revision: https://reviews.llvm.org/D71881
mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
mlir/test/Conversion/StandardToSPIRV/std-to-spirv.mlir