This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Vector] Update the lowering of `vector.transfer_write` to SCF
ClosedPublic

Authored by awarzynski on Jun 30 2023, 8:22 AM.

Details

Summary

This change updates the lowering of vector.transfer_write to SCF when
scalable vectors are used. Specifically, when lowering
vector.transfer_write to a loop of vector.extractelement ops, make
sure that the upper bound of the generated loop is scaled by
vector.vscale:

%10 = vector.vscale
%11 = arith.muli %10, %c16 : index
scf.for %arg2 = %c0 to %11 step %c1

For reference, this is the current version (i.e. before this change):

scf.for %arg2 = %c0 to %c16 step %c1

Note that this only valid for fixed-width vectors.

Diff Detail

Event Timeline

awarzynski created this revision.Jun 30 2023, 8:22 AM
Herald added a project: Restricted Project. · View Herald Transcript
awarzynski requested review of this revision.Jun 30 2023, 8:22 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 30 2023, 8:22 AM

Remove the "accidental" change in Type.cpp, sorry about the noise!

dcaballe accepted this revision.Jun 30 2023, 11:15 AM

LG, thanks!

This revision is now accepted and ready to land.Jun 30 2023, 11:15 AM
This revision was landed with ongoing or failed builds.Jun 30 2023, 12:15 PM
This revision was automatically updated to reflect the committed changes.