[llvm-commits] [llvm] r48355 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp
Duncan Sands
baldrick at free.fr
Thu Mar 13 22:23:57 PDT 2008
Author: baldrick
Date: Fri Mar 14 00:23:57 2008
New Revision: 48355
URL: http://llvm.org/viewvc/llvm-project?rev=48355&view=rev
Log:
Simplify using getIntPtrConstant.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp?rev=48355&r1=48354&r2=48355&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp Fri Mar 14 00:23:57 2008
@@ -171,7 +171,7 @@
N->getOperand(2));
else
Hi = DAG.getNode(ISD::INSERT_VECTOR_ELT, Hi.getValueType(), Hi, ScalarOp,
- DAG.getConstant(Index - LoNumElts, TLI.getPointerTy()));
+ DAG.getIntPtrConstant(Index - LoNumElts));
}
void DAGTypeLegalizer::SplitRes_VECTOR_SHUFFLE(SDNode *N,
@@ -179,8 +179,6 @@
// Build the low part.
SDOperand Mask = N->getOperand(2);
SmallVector<SDOperand, 16> Ops;
- MVT::ValueType PtrVT = TLI.getPointerTy();
-
MVT::ValueType LoVT, HiVT;
GetSplitDestVTs(N->getValueType(0), LoVT, HiVT);
MVT::ValueType EltVT = MVT::getVectorElementType(LoVT);
@@ -198,7 +196,7 @@
Idx -= NumElements;
}
Ops.push_back(DAG.getNode(ISD::EXTRACT_VECTOR_ELT, EltVT, InVec,
- DAG.getConstant(Idx, PtrVT)));
+ DAG.getIntPtrConstant(Idx)));
}
Lo = DAG.getNode(ISD::BUILD_VECTOR, LoVT, &Ops[0], Ops.size());
Ops.clear();
@@ -211,7 +209,7 @@
Idx -= NumElements;
}
Ops.push_back(DAG.getNode(ISD::EXTRACT_VECTOR_ELT, EltVT, InVec,
- DAG.getConstant(Idx, PtrVT)));
+ DAG.getIntPtrConstant(Idx)));
}
Hi = DAG.getNode(ISD::BUILD_VECTOR, HiVT, &Ops[0], Ops.size());
}
More information about the llvm-commits
mailing list