This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Define sp.VectorShuffle
ClosedPublic

Authored by antiagainst on Feb 1 2021, 2:45 PM.

Details

Summary

This patch adds basic op definition, parser/printer, and verifier.

Diff Detail

Event Timeline

antiagainst created this revision.Feb 1 2021, 2:45 PM
antiagainst requested review of this revision.Feb 1 2021, 2:45 PM
ThomasRaoux added inline comments.Feb 1 2021, 8:20 PM
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td
295–296

Do we need a check to make sure the sources and result have the same component type? I don't see it.

ergawy added a subscriber: ergawy.Feb 2 2021, 1:08 AM
ergawy added inline comments.
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td
332

Should it be SPV_Vector instead?

Address comments

antiagainst marked 2 inline comments as done.Feb 2 2021, 5:38 AM
antiagainst added inline comments.
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td
295–296

Good catch! I added a rule via AllElementTypesMatch. Generally for rules enforced by ODS directly, we can omit dedicated tests given they are already enforced by the framework. :)

332

Good catch! Done.

ThomasRaoux accepted this revision.Feb 2 2021, 6:16 AM
This revision is now accepted and ready to land.Feb 2 2021, 6:16 AM
This revision was automatically updated to reflect the committed changes.
antiagainst marked 2 inline comments as done.