[llvm] r319119 - [DAGCombiner] Use EVT::changeVectorElementTypeToInteger() instead of implementing manually.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 15:51:31 PST 2017
Author: ctopper
Date: Mon Nov 27 15:51:31 2017
New Revision: 319119
URL: http://llvm.org/viewvc/llvm-project?rev=319119&view=rev
Log:
[DAGCombiner] Use EVT::changeVectorElementTypeToInteger() instead of implementing manually.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=319119&r1=319118&r2=319119&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Nov 27 15:51:31 2017
@@ -7783,10 +7783,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SD
// 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));
More information about the llvm-commits
mailing list