From: Sanjay Patel Date: Tue, 21 May 2019 18:28:22 +0000 (+0000) Subject: [SelectionDAG] remove redundant code; NFCI X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0255013e51771c8a3433814c7f2d2939b69b8b2c;p=llvm [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); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361284 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 5c2d265b599..31410f208ac 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -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 MappedOps(PaddedMaskNumElts, -1);