All v2f64 shuffle cases can be handled.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 24 Mar 2006 06:40:32 +0000 (06:40 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 24 Mar 2006 06:40:32 +0000 (06:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27044 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt
lib/Target/X86/X86ISelLowering.cpp

index 1c227d3fd140aa657a8e1fc9cf61c611bf81bd2b..0cf645c7a8f136ceecde8facdce0406c364e23c8 100644 (file)
@@ -655,3 +655,7 @@ call _foo
 
 Obviously it would have been better for the first mov (or any op) to store
 directly %esp[0] if there are no other uses.
+
+//===---------------------------------------------------------------------===//
+
+Add more vector shuffle special cases using unpckhps and unpcklps.
index 4e209e4554e08fd6093f4c3c91d4d52c532dca3f..540fc11c1ebcbae8c7cdcf222fb2b7e17ffa6682 100644 (file)
@@ -2329,7 +2329,10 @@ SDOperand X86TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
         return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, V1,
                            DAG.getNode(ISD::UNDEF, V1.getValueType()),
                            PermMask);
-    } else if (NumElems == 2 || X86::isSHUFPMask(PermMask.Val)) {
+    } else if (NumElems == 2) {
+      // All v2f64 cases are handled.
+      return SDOperand();
+    } else if (X86::isSHUFPMask(PermMask.Val)) {
       SDOperand Elt = PermMask.getOperand(0);
       if (cast<ConstantSDNode>(Elt)->getValue() >= NumElems) {
         // Swap the operands and change mask.