[llvm-commits] [llvm] r113247 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Tue Sep 7 11:41:45 PDT 2010


Author: bruno
Date: Tue Sep  7 13:41:45 2010
New Revision: 113247

URL: http://llvm.org/viewvc/llvm-project?rev=113247&view=rev
Log:
decouple MMX check from regular splat checks. Some refactoring is coming, and MMX should be left alone to be easily removed after moving to intrinsics

Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=113247&r1=113246&r2=113247&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Sep  7 13:41:45 2010
@@ -5271,12 +5271,16 @@
   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!





More information about the llvm-commits mailing list