This is an archive of the discontinued LLVM Phabricator instance.

[X86][SSE] Allow target shuffle combining to match masks with SM_Sentinel values
ClosedPublic

Authored by RKSimon on Jun 18 2016, 2:59 PM.

Details

Summary

We currently only allow exact matches of shuffle mask patterns during target shuffle combining.

This patch relaxes this to permit SM_SentinelUndef in the combined shuffle to always be accepted as well as allowing exact matching of the SM_SentinelZero value.

I've adjusted some tests that were requiring exact shuffle masks to now include undef values.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 61176.Jun 18 2016, 2:59 PM
RKSimon retitled this revision from to [X86][SSE] Allow target shuffle combining to match masks with SM_Sentinel values.
RKSimon updated this object.
RKSimon added reviewers: qcolombet, ab, spatel, andreadb.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: llvm-commits.
spatel accepted this revision.Jun 19 2016, 10:23 AM
spatel edited edge metadata.

LGTM. Can you put isTargetShuffleEquivalent() in a non-target-specific place, so any backend can use it?

This revision is now accepted and ready to land.Jun 19 2016, 10:23 AM

LGTM. Can you put isTargetShuffleEquivalent() in a non-target-specific place, so any backend can use it?

Not really - the sentinels are X86 concepts for decoded shuffles and we don't have an accepted standard for what negative/out-of-range mask indices represent. isShuffleEquivalent could possibly be moved to a generic location - I'll investigate.

This revision was automatically updated to reflect the committed changes.