1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

[DAGCombiner] Use EVT::changeVectorElementTypeToInteger() instead of implementing manually.

llvm-svn: 319119
This commit is contained in:
Craig Topper 2017-11-27 23:51:31 +00:00
parent 0b9daaae51
commit 00ea30a52b

View File

@ -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));