This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX] Support bitmask style integer shuffles for 256-bit integer vectors
ClosedPublic

Authored by RKSimon on Feb 16 2016, 7:48 AM.

Details

Summary

AVX1 doesn't support the shuffling of 256-bit integer vectors. For 32/64-bit elements we get around this by shuffling as float/double but for 8/16-bit elements (assuming they can't widen) we currently just split, shuffle as 128-bit vectors and concatenate the results back.

This patch adds the ability to lower using the bit-mask/bit-blend patterns before defaulting to the splitting behaviour. In some cases this ends up matching what AVX2 would do anyhow or what AVX1 does on the split vectors.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 48070.Feb 16 2016, 7:48 AM
RKSimon retitled this revision from to [X86][AVX] Support bitmask style integer shuffles for 256-bit integer vectors.
RKSimon updated this object.
RKSimon added reviewers: delena, ab, spatel, andreadb.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: llvm-commits.
ab accepted this revision.Feb 16 2016, 3:54 PM
ab edited edge metadata.

LGTM.

I'd split this in two to make what changed even more obvious and bisectable.

This revision is now accepted and ready to land.Feb 16 2016, 3:54 PM
In D17292#354068, @ab wrote:

I'd split this in two to make what changed even more obvious and bisectable.

That should be pretty trivial, thanks Ahmed.

This revision was automatically updated to reflect the committed changes.