HomePhabricator

[mlir][StandardToSPIRV] Handle conversion of cmpi operation with i1 type…

Authored by mravishankar on Apr 29 2020, 9:57 AM.

Description

[mlir][StandardToSPIRV] Handle conversion of cmpi operation with i1 type operands.

The instructions used to convert std.cmpi cannot have i1 types
according to SPIR-V specification. A different set of operations are
specified in the SPIR-V spec for comparing boolean types. Enhance the
StandardToSPIRV lowering to target these instructions when operands to
std.cmpi operation are of i1 type.

Differential Revision: https://reviews.llvm.org/D79049