This is an archive of the discontinued LLVM Phabricator instance.

[mlir][StandardToSPIRV] Add support for lowering integer casting.
ClosedPublic

Authored by hanchung on Apr 29 2020, 4:30 PM.

Details

Summary

Maps ZeroExtendIOp and TruncateIOp to spirv::UConvertOp and spirv::SConvertOp.

Depends On D78974

Diff Detail

Event Timeline

hanchung created this revision.Apr 29 2020, 4:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2020, 4:30 PM
hanchung updated this revision to Diff 261098.Apr 29 2020, 4:52 PM

Add tests.

antiagainst requested changes to this revision.Apr 30 2020, 11:55 AM
antiagainst added inline comments.
mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
773

Shouldn't we use UConvert here?

This revision now requires changes to proceed.Apr 30 2020, 11:55 AM
hanchung updated this revision to Diff 261376.Apr 30 2020, 3:14 PM
hanchung marked 2 inline comments as done.

Address comments.

mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
773

good catch...thanks!

hanchung edited the summary of this revision. (Show Details)Apr 30 2020, 3:29 PM
antiagainst accepted this revision.Apr 30 2020, 3:31 PM
This revision is now accepted and ready to land.Apr 30 2020, 3:31 PM
This revision was automatically updated to reflect the committed changes.