This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Attempt to use whole register vmovs for MVE shuffles.
ClosedPublic

Authored by dmgreen on Oct 28 2019, 6:01 AM.

Details

Summary

MVE doesn't have the range of shuffle instructions available in Neon. We also cannot use the trick of cutting a difficult vector shuffle in half to simplify things. Instead we need to be more careful about how we lower shuffles.

This patch adds an extra combine that attempts to find "whole lane" vmovs when lowering shuffles of smaller types. This helps us make some shuffles a lot simpler, generating single lane movs for the parts that can make use of it, falling back to the original shuffle for the rest.

Diff Detail

Event Timeline

dmgreen created this revision.Oct 28 2019, 6:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2019, 6:01 AM
ostannard accepted this revision.Nov 4 2019, 5:30 AM

LGTM with a few nits.

llvm/lib/Target/ARM/ARMISelLowering.cpp
7859

Nit: I think it would be clearer to put the getMovIdx call on the line above.

7878

Could be a SmallVector<int, 16>.

This revision is now accepted and ready to land.Nov 4 2019, 5:30 AM
This revision was automatically updated to reflect the committed changes.