decouple MMX check from regular splat checks. Some refactoring is coming, and MMX...
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 7 Sep 2010 18:41:45 +0000 (18:41 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 7 Sep 2010 18:41:45 +0000 (18:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113247 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index e496365de2ebd7f3125e9a7267f5faf53abc2cc2..a98de5bc7b24d01117c342f641d5578c41b8069a 100644 (file)
@@ -5271,12 +5271,16 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const {
   if (isZeroShuffle(SVOp))
     return getZeroVector(VT, Subtarget->hasSSE2(), DAG, dl);
 
+  // FIXME: this is somehow handled during isel by MMX pattern fragments. Remove
+  // the check or come up with another solution when all MMX move to intrinsics,
+  // but don't allow this to be considered legal, we don't want vector_shuffle
+  // operations to be matched during isel anymore.
+  if (isMMX && SVOp->isSplat())
+    return Op;
+
   // Promote splats to v4f32.
-  if (SVOp->isSplat()) {
-    if (isMMX)
-      return Op;
+  if (SVOp->isSplat())
     return PromoteSplat(SVOp, DAG);
-  }
 
   // If the shuffle can be profitably rewritten as a narrower shuffle, then
   // do it!