make explicit that we not handle several mmx shuffles
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Sat, 4 Sep 2010 02:50:13 +0000 (02:50 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Sat, 4 Sep 2010 02:50:13 +0000 (02:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113058 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 45052da99152a5a519c620664a584972427e4b74..147f201ac6732dead5c4ff069cc19e69b55ee10e 100644 (file)
@@ -5467,19 +5467,19 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const {
   SmallVector<int, 16> M;
   SVOp->getMask(M);
 
-  // Very little shuffling can be done for 64-bit vectors right now.
+  if (isPALIGNRMask(M, VT, HasSSSE3))
+    return getTargetShuffleNode(X86ISD::PALIGN, dl, VT, V1, V2,
+                                X86::getShufflePALIGNRImmediate(SVOp),
+                                DAG);
+
+  // MMX shuffles not already handled must be expanded.
   if (VT.getSizeInBits() == 64)
-    return isPALIGNRMask(M, VT, Subtarget->hasSSSE3()) ? Op : SDValue();
+    return SDValue();
 
   // FIXME: pshufb, blends, shifts.
   if (VT.getVectorNumElements() == 2)
     return Op;
 
-  if (isPALIGNRMask(M, VT, HasSSSE3))
-    return getTargetShuffleNode(X86ISD::PALIGN, dl, VT, V1, V2,
-                                X86::getShufflePALIGNRImmediate(SVOp),
-                                DAG);
-
   if (ShuffleVectorSDNode::isSplatMask(&M[0], VT) &&
       SVOp->getSplatIndex() == 0 && V2IsUndef) {
     if (VT == MVT::v2f64)