This is an archive of the discontinued LLVM Phabricator instance.

[DAG][AArch64] Fold shuffle_vector<4,5,6,7> to extract_subvector
ClosedPublic

Authored by dmgreen on Jun 22 2023, 12:17 AM.

Details

Summary

During legalization, we can end up with shuffles that are identity masks, so act like extract_subvector, but do not simplify to extract_subvector. This adjusts the profitability heuristic in foldExtractSubvectorFromShuffleVector to allow identity vectors that do not start at element 0. Undef masks elements are excluded as it can be more useful to keep the undef elements.

Diff Detail

Event Timeline

dmgreen created this revision.Jun 22 2023, 12:17 AM
dmgreen requested review of this revision.Jun 22 2023, 12:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2023, 12:17 AM

Ping. Thanks

RKSimon accepted this revision.Jun 29 2023, 4:46 AM

LGTM

This revision is now accepted and ready to land.Jun 29 2023, 4:46 AM
This revision was landed with ongoing or failed builds.Jun 30 2023, 3:13 AM
This revision was automatically updated to reflect the committed changes.