Do not introduce new shuffle patterns after operation legalization if SHUFFLE_VECTOR
authorOwen Anderson <resistor@mac.com>
Thu, 28 Aug 2014 17:49:58 +0000 (17:49 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 28 Aug 2014 17:49:58 +0000 (17:49 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216678 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index ebe7049fa090cefe5c6d7398a994614687a52c48..3e5a7e410425098c6be8ada6ea42fa37d8e04e36 100644 (file)
@@ -10316,8 +10316,7 @@ SDValue DAGCombiner::visitBUILD_VECTOR(SDNode *N) {
   // 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;