summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-05-17 21:43:43 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-05-17 21:43:43 +0000
commit04126234e5a3088e7fa04c3e6137b5a91c147f6d (patch)
treea9845c5e2e33124220ed391ef0d83735cdb87385 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent52ddb7bcdd290c1aff8c1dd71fa86dc9d9e10854 (diff)
downloadbcm5719-llvm-04126234e5a3088e7fa04c3e6137b5a91c147f6d.tar.gz
bcm5719-llvm-04126234e5a3088e7fa04c3e6137b5a91c147f6d.zip
Replace redundant code
Use EVT::changeExtendedVectorElementTypeToInteger instead of doing the same thing that it does llvm-svn: 182165
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index a8621a89a8a..72e3f4dd0ab 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4519,16 +4519,11 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
return DAG.getSetCC(N->getDebugLoc(), VT, N0.getOperand(0),
N0.getOperand(1),
cast<CondCodeSDNode>(N0.getOperand(2))->get());
+
// 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(),
- N0VT.getScalarType().getSizeInBits());
- EVT MatchingVectorType =
- EVT::getVectorVT(*DAG.getContext(), MatchingElementType,
- N0VT.getVectorNumElements());
-
+ EVT MatchingVectorType = N0VT.changeVectorElementTypeToInteger();
if (SVT == MatchingVectorType) {
SDValue VsetCC = DAG.getSetCC(N->getDebugLoc(), MatchingVectorType,
N0.getOperand(0), N0.getOperand(1),
OpenPOWER on IntegriCloud