[llvm] r216678 - Do not introduce new shuffle patterns after operation legalization if SHUFFLE_VECTOR

Owen Anderson resistor at mac.com
Thu Aug 28 10:49:58 PDT 2014


Author: resistor
Date: Thu Aug 28 12:49:58 2014
New Revision: 216678

URL: http://llvm.org/viewvc/llvm-project?rev=216678&view=rev
Log:
Do not introduce new shuffle patterns after operation legalization if SHUFFLE_VECTOR
was marked custom.  The target independent DAG combine has no way to know if
the shuffles it is introducing are ones that the target could support or not.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=216678&r1=216677&r2=216678&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Aug 28 12:49:58 2014
@@ -10316,8 +10316,7 @@ SDValue DAGCombiner::visitBUILD_VECTOR(S
   // at most two distinct vectors, turn this into a shuffle node.
 
   // May only combine to shuffle after legalize if shuffle is legal.
-  if (LegalOperations &&
-      !TLI.isOperationLegalOrCustom(ISD::VECTOR_SHUFFLE, VT))
+  if (LegalOperations && !TLI.isOperationLegal(ISD::VECTOR_SHUFFLE, VT))
     return SDValue();
 
   SDValue VecIn1, VecIn2;





More information about the llvm-commits mailing list