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

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Wed Sep 1 21:20:26 PDT 2010


Author: bruno
Date: Wed Sep  1 23:20:26 2010
New Revision: 112805

URL: http://llvm.org/viewvc/llvm-project?rev=112805&view=rev
Log:
Move condition out to prepare for more matching

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=112805&r1=112804&r2=112805&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Sep  1 23:20:26 2010
@@ -5181,6 +5181,11 @@
     }
   }
 
+  if (OptForSize) { // NOTE: isPSHUFDMask can also match this mask...
+    if (HasSSE2 && X86::isUNPCKL_v_undef_Mask(SVOp) && VT == MVT::v4i32)
+      return getTargetShuffleNode(X86ISD::PUNPCKLDQ, dl, VT, V1, V1, DAG);
+  }
+
   if (X86::isPSHUFDMask(SVOp)) {
     // The actual implementation will match the mask in the if above and then
     // during isel it can match several different instructions, not only pshufd
@@ -5188,10 +5193,6 @@
     if (X86::isMOVDDUPMask(SVOp) && ((VT == MVT::v4f32 || VT == MVT::v2i64)))
         return getTargetShuffleNode(X86ISD::MOVLHPS, dl, VT, V1, V1, DAG);
 
-    if (OptForSize && HasSSE2 && X86::isUNPCKL_v_undef_Mask(SVOp) &&
-        VT == MVT::v4i32)
-      return getTargetShuffleNode(X86ISD::PUNPCKLDQ, dl, VT, V1, V1, DAG);
-
     unsigned TargetMask = X86::getShuffleSHUFImmediate(SVOp);
 
     if (HasSSE2 && (VT == MVT::v4f32 || VT == MVT::v4i32))





More information about the llvm-commits mailing list