summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-11-27 23:51:31 +0000
committerCraig Topper <craig.topper@intel.com>2017-11-27 23:51:31 +0000
commit57c02d18b93abb16499fef8019848ad1da345997 (patch)
tree94f5412d2555a80d2385f8615554f2bf02a7281f
parentd19c2e812640df745d857e7347e617f1fb18057f (diff)
downloadbcm5719-llvm-57c02d18b93abb16499fef8019848ad1da345997.tar.gz
bcm5719-llvm-57c02d18b93abb16499fef8019848ad1da345997.zip
[DAGCombiner] Use EVT::changeVectorElementTypeToInteger() instead of implementing manually.
llvm-svn: 319119
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 085597a71a3..b54e332e352 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -7783,10 +7783,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
// If the desired elements are smaller or larger than the source
// elements we can use a matching integer vector type and then
// truncate/sign extend.
- EVT MatchingElementType = EVT::getIntegerVT(
- *DAG.getContext(), N00VT.getScalarSizeInBits());
- EVT MatchingVectorType = EVT::getVectorVT(
- *DAG.getContext(), MatchingElementType, N00VT.getVectorNumElements());
+ EVT MatchingVectorType = N00VT.changeVectorElementTypeToInteger();
SDValue VsetCC =
DAG.getNode(ISD::SETCC, DL, MatchingVectorType, N0.getOperand(0),
N0.getOperand(1), N0.getOperand(2));
OpenPOWER on IntegriCloud