diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-02-04 23:26:37 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-02-04 23:26:37 +0000 |
commit | 04dce84ead73732dc7a88eab9fbee5b60a9bcd1a (patch) | |
tree | eaba940bf3327b3ba213aded36b0fbf6601c09f5 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | ceaf9c1633698bd8a5d2845a0c401ae72a166d8a (diff) | |
download | bcm5719-llvm-04dce84ead73732dc7a88eab9fbee5b60a9bcd1a.tar.gz bcm5719-llvm-04dce84ead73732dc7a88eab9fbee5b60a9bcd1a.zip |
[DAGCombiner] Use DAG.getAnyExtOrTrunc to simplify some code. NFC
llvm-svn: 294109
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 8a85feba1c4..d38a9fca019 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -12828,11 +12828,7 @@ SDValue DAGCombiner::visitINSERT_VECTOR_ELT(SDNode *N) { // All the operands of BUILD_VECTOR must have the same type; // we enforce that here. EVT OpVT = Ops[0].getValueType(); - if (InVal.getValueType() != OpVT) - InVal = OpVT.bitsGT(InVal.getValueType()) ? - DAG.getNode(ISD::ANY_EXTEND, DL, OpVT, InVal) : - DAG.getNode(ISD::TRUNCATE, DL, OpVT, InVal); - Ops[Elt] = InVal; + Ops[Elt] = OpVT.isInteger() ? DAG.getAnyExtOrTrunc(InVal, DL, OpVT) : InVal; } // Return the new vector |