This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Vector] Add InsertStridedSliceOp -> ShuffleOp for the rank-1 cases.
ClosedPublic

Authored by nicolasvasilache on Oct 26 2021, 3:02 PM.

Details

Summary

This also fixes the vector.shuffle C++ builder which had an incorrect type assumption that triggers with this new rewrite.
The vector.shuffle semantics were correct though.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Oct 26 2021, 3:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 26 2021, 3:02 PM
aartbik added inline comments.Oct 26 2021, 4:35 PM
mlir/lib/Dialect/Vector/VectorInsertExtractStridedSliceRewritePatterns.cpp
124–127

nit: any reason you switched to int? we define getRank as int64_t and although I am sure our compiler breaks way before this for larger rank, it seems a bit nicer to keep the type consistent

here and below

157

int64_t i, e

now we are operating on offset and sizes * stride, and that may need more bit width

springerm accepted this revision.Oct 27 2021, 12:40 AM
This revision is now accepted and ready to land.Oct 27 2021, 12:40 AM
nicolasvasilache marked 2 inline comments as done.

Address review + rebase.

This revision was landed with ongoing or failed builds.Oct 27 2021, 12:58 AM
This revision was automatically updated to reflect the committed changes.