This is an archive of the discontinued LLVM Phabricator instance.

[X86][XOP] Support for VPERMIL2PD/VPERMIL2PS 2-input shuffle instructions
ClosedPublic

Authored by RKSimon on May 7 2016, 8:53 AM.

Details

Summary

This patch begins adding support for lowering to the XOP VPERMIL2PD/VPERMIL2PS shuffle instructions - adding the X86ISD::VPERMIL2 opcode and cleaning up the usage.

Mask decoding/target shuffle support will be added in future patches - this patch has to do some initial cleanup as the internal llvm intrinsics were assuming the shuffle mask operand was the same type as the float/double input operands (I guess to simplify the intrinsic definitions in X86InstrXOP.td to a single value type). These needed changing to integer types - this matches the clang builtin and the AMD intrinsics definitions. As its just the llvm intrinsic ir I don't think I need to provide an upgrade path but can if anybody thinks it necessary.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 56499.May 7 2016, 8:53 AM
RKSimon retitled this revision from to [X86][XOP] Support for VPERMIL2PD/VPERMIL2PS 2-input shuffle instructions.
RKSimon updated this object.
RKSimon added reviewers: craig.topper, spatel, andreadb.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: llvm-commits.
RKSimon updated this revision to Diff 59181.Jun 1 2016, 1:33 AM

Added auto-upgrade for old vpermil2 intrinsics still using a float/double vector for its shuffle mask

spatel accepted this revision.Jun 2 2016, 8:50 AM
spatel edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Jun 2 2016, 8:50 AM
This revision was automatically updated to reflect the committed changes.