Patch to provide shuffle decodes and asm comments for the sse pslldq/psrldq byte shift instructions.
Added comments checks to a number of vector insert/shuffle tests (we don't have that many uses cases of slldq/srldq at the moment).
Paths
| Differential D5598
SSE pslldq/psrldq shuffle mask decodes ClosedPublic Authored by RKSimon on Oct 3 2014, 3:52 AM.
Details Summary Patch to provide shuffle decodes and asm comments for the sse pslldq/psrldq byte shift instructions. Added comments checks to a number of vector insert/shuffle tests (we don't have that many uses cases of slldq/srldq at the moment).
Diff Detail Event TimelineRKSimon updated this object.
Comment Actions The decoder always creates a byte-vector shuffle mask. I've altered the arguments to (hopefully) make this clear. Rebased tests. Comment Actions Ping. Changes to the shuffle tests in the latest rebase have resulted in the psrldq test cases disappearing. This will be fixed with the followup patch to this that improves byte shift/rotate shuffles on pre-SSSE3 targets. Comment Actions Hi Simon, Could you add test cases with the ymm versions? Those are the interesting ones :). Thanks, Comment Actions Hi Quentin,
Chandler can confirm but I don't think we have anything that creates vec256 byte rotates/shifts yet (and http://reviews.llvm.org/D5699 doesn't help either - it only improves the vec128 case) - if you wish I can remove the ymm support from X86InstComments.cpp to make this clear and add it back in a future patch that adds better support? Simon. Comment Actions Updated test cases for SSE2/AVX1/AVX2 intrinsics builtins to include the pslldq/psrldq shuffle mask decode in the comments
Comment Actions Chandler's recommendations: re-added vector type to decode function arguments, removed excess braces, for-loop comparison tidy up; removed operands in test cases with comments
This revision is now accepted and ready to land.Oct 14 2014, 2:04 AM
Revision Contents
Diff 14777 lib/Target/X86/InstPrinter/X86InstComments.cpp
lib/Target/X86/Utils/X86ShuffleDecode.h
lib/Target/X86/Utils/X86ShuffleDecode.cpp
test/CodeGen/X86/avx-intrinsics-x86.ll
test/CodeGen/X86/avx2-intrinsics-x86.ll
test/CodeGen/X86/sse2-intrinsics-x86.ll
test/CodeGen/X86/vector-shuffle-128-v8.ll
|
This code doesn't really make sense. If you know the exact type you know the exact size, just pass 128.
But what I meant with my comment was still to pass the MVT down, but to do the getSizeInBits query inside the decode routine.