Page MenuHomePhabricator

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

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



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.

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.


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