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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216678 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2014-08-28 17:49:58 +00:00
parent 98491c0ff9
commit 538b1cbdf5

View 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;