This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by mravishankar on Apr 28 2020, 3:54 PM.

Details

Summary

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.

Diff Detail

Event Timeline

mravishankar created this revision.Apr 28 2020, 3:54 PM
hanchung accepted this revision.Apr 28 2020, 4:22 PM
hanchung added inline comments.
mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
197

Update the comment?

This revision is now accepted and ready to land.Apr 28 2020, 4:22 PM
antiagainst accepted this revision.Apr 29 2020, 7:52 AM
This revision was automatically updated to reflect the committed changes.