This is an archive of the discontinued LLVM Phabricator instance.

[X86][SSE] Improve legal SHUFP and PSHUFD shuffle matching
ClosedPublic

Authored by RKSimon on Nov 15 2014, 8:07 AM.

Details

Summary

Updated X86TargetLowering::isShuffleMaskLegal to match SHUFP masks with commuted inputs and PSHUFD masks that reference the second input.

As part of this I've refactored isPSHUFDMask to work in a more general manner and allow it to match against either the first or second input vector.

As discussed with Andrea, further changes should probably wait until the old shuffle lowering code is dropped, but these initial changes were beneficial and easy to isolate.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 16267.Nov 15 2014, 8:07 AM
RKSimon retitled this revision from to [X86][SSE] Improve legal SHUFP and PSHUFD shuffle matching.
RKSimon updated this object.
RKSimon edited the test plan for this revision. (Show Details)
RKSimon added reviewers: andreadb, chandlerc.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: Unknown Object (MLST).
andreadb accepted this revision.Nov 15 2014, 10:08 AM
andreadb edited edge metadata.

Hi Simon,

LGTM. Thanks!

This revision is now accepted and ready to land.Nov 15 2014, 10:08 AM
RKSimon closed this revision.Nov 15 2014, 1:13 PM
RKSimon updated this revision to Diff 16270.

Closed by commit rL222087 (authored by @RKSimon).