This is an archive of the discontinued LLVM Phabricator instance.

[CodeGenPrepare] Update optimizeGatherScatterInst for scalable vectors.
ClosedPublic

Authored by paulwalker-arm on Dec 3 2020, 4:45 AM.

Details

Summary

optimizeGatherScatterInst does nothing specific to fixed length vectors
but uses FixedVectorType to extract the number of elements. This patch
simply updates the code to use VectorType and getElementCount instead.

For testing I just copied Transforms/CodeGenPrepare/X86/gather-scatter-opt.ll
replacing <4 x with <vscale x 4.

Diff Detail

Event Timeline

paulwalker-arm created this revision.Dec 3 2020, 4:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 3 2020, 4:45 AM
paulwalker-arm requested review of this revision.Dec 3 2020, 4:45 AM
This revision is now accepted and ready to land.Dec 14 2020, 4:25 AM