[PATCH] SSE pslldq/psrldq shuffle mask decodes

Chandler Carruth chandlerc at gmail.com
Sun Oct 5 16:25:27 PDT 2014

Comment at: lib/Target/X86/Utils/X86ShuffleDecode.cpp:83-84
@@ +82,4 @@
+void DecodePSLLDQMask(MVT VT, unsigned Imm, SmallVectorImpl<int> &ShuffleMask) {
+  unsigned NumElts = VT.getVectorNumElements();
+  unsigned Offset = Imm * (VT.getVectorElementType().getSizeInBits() / 8);
I wouldn't decode this in terms of the vector element type. The mask should be a byte-vector mask in all cases, and VT should just provide the size of the vector (128-bit, 256-bit, 512-bit, whatever).


More information about the llvm-commits mailing list