aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-05-21 18:28:22 +0000
committerSanjay Patel <spatel@rotateright.com>2019-05-21 18:28:22 +0000
commit51dc59d0903fc86b37e9d910aa6f33dd87fdaae5 (patch)
treec3dfa49cb405c2e6eb610b49d06156416d6999c7 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent6b21c4a4eed8e7a5ab5d80dfe207eadb7cf5a6ab (diff)
downloadllvm-51dc59d0903fc86b37e9d910aa6f33dd87fdaae5.zip
llvm-51dc59d0903fc86b37e9d910aa6f33dd87fdaae5.tar.gz
llvm-51dc59d0903fc86b37e9d910aa6f33dd87fdaae5.tar.bz2
[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
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 5c2d265..31410f2 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/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<int, 8> MappedOps(PaddedMaskNumElts, -1);