This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Check only last dim stride in transfer op lowering
ClosedPublic

Authored by springerm on May 20 2021, 8:04 PM.

Details

Summary

Lower a 1D vector transfer op to LLVM if the last dim stride is 1. Also fixes a bug in the original unit stride computation.

Diff Detail

Event Timeline

springerm created this revision.May 20 2021, 8:04 PM
springerm requested review of this revision.May 20 2021, 8:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2021, 8:04 PM
springerm updated this revision to Diff 346916.May 20 2021, 8:25 PM

add additional test

ftynse accepted this revision.May 24 2021, 6:36 AM
ftynse added inline comments.
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
1033

Nit: SmallVector (now) has a default values of stack elements, just omit it in the template specification unless you have a strong reason to choose a specific value.

1035

The fact that this also returns true for memrefs with no strides (0D) should be documented.

This revision is now accepted and ready to land.May 24 2021, 6:36 AM
springerm marked 2 inline comments as done.May 25 2021, 1:54 AM