This is an archive of the discontinued LLVM Phabricator instance.

[X86][XOP] Add support for the matching of the VPCMOV bit select instruction
ClosedPublic

Authored by RKSimon on Apr 6 2015, 8:06 AM.

Details

Summary

XOP has the VPCMOV instruction that performs the common vector bit select operation OR( AND( SRC1, SRC3 ), AND( SRC2, ~SRC3 ) )

This patch adds tablegen pattern matching for this instruction.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 23273.Apr 6 2015, 8:06 AM
RKSimon retitled this revision from to [X86][XOP] Add support for the matching of the VPCMOV bit select instruction.
RKSimon updated this object.
RKSimon edited the test plan for this revision. (Show Details)
RKSimon added reviewers: craig.topper, andreadb, spatel.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: Unknown Object (MLST).
RKSimon updated this revision to Diff 38357.Oct 25 2015, 2:15 PM
RKSimon updated this object.

Updated to include upgrade of intrinsics. Tested on bdver4 excavator hardware.

spatel accepted this revision.Nov 2 2015, 11:53 AM
spatel edited edge metadata.

LGTM - see comment about potentially reducing the test overhead.

test/CodeGen/X86/xop-pcmov.ll
2

Does the 'avx2' run exercise a different path through the code? If not, the plain 'avx' run should be sufficient by itself?

This revision is now accepted and ready to land.Nov 2 2015, 11:53 AM
RKSimon added inline comments.Nov 2 2015, 2:46 PM
test/CodeGen/X86/xop-pcmov.ll
2

My reason for adding it was because the 256-bit integer AND/ANDN/OR ops are only legal on AVX2.

This revision was automatically updated to reflect the committed changes.