[SelectionDAG] remove redundant code; NFCI

getNode() squashes concatenation of undefs via FoldCONCAT_VECTORS():
  // Concat of UNDEFs is UNDEF.
  if (llvm::all_of(Ops, [](SDValue Op) { return Op.isUndef(); }))
    return DAG.getUNDEF(VT);

llvm-svn: 361284
This commit is contained in:
Sanjay Patel 2019-05-21 18:28:22 +00:00
parent 6b21c4a4ee
commit 51dc59d090
1 changed files with 2 additions and 6 deletions

View File

@ -3637,12 +3637,8 @@ void SelectionDAGBuilder::visitShuffleVector(const User &I) {
MOps1[0] = Src1;
MOps2[0] = Src2;
Src1 = Src1.isUndef()
? DAG.getUNDEF(PaddedVT)
: DAG.getNode(ISD::CONCAT_VECTORS, DL, PaddedVT, MOps1);
Src2 = Src2.isUndef()
? DAG.getUNDEF(PaddedVT)
: DAG.getNode(ISD::CONCAT_VECTORS, DL, PaddedVT, MOps2);
Src1 = DAG.getNode(ISD::CONCAT_VECTORS, DL, PaddedVT, MOps1);
Src2 = DAG.getNode(ISD::CONCAT_VECTORS, DL, PaddedVT, MOps2);
// Readjust mask for new input vector length.
SmallVector<int, 8> MappedOps(PaddedMaskNumElts, -1);