mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Refactor the code to grab the low and high parts of a value
using EXTRACT_ELEMENT into a utility function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70056 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -933,6 +933,18 @@ void DAGTypeLegalizer::GetSplitDestVTs(MVT InVT, MVT &LoVT, MVT &HiVT) {
|
||||
}
|
||||
}
|
||||
|
||||
/// GetPairElements - Use ISD::EXTRACT_ELEMENT nodes to extract the low and
|
||||
/// high parts of the given value.
|
||||
void DAGTypeLegalizer::GetPairElements(SDValue Pair,
|
||||
SDValue &Lo, SDValue &Hi) {
|
||||
DebugLoc dl = Pair.getDebugLoc();
|
||||
MVT NVT = TLI.getTypeToTransformTo(Pair.getValueType());
|
||||
Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, NVT, Pair,
|
||||
DAG.getIntPtrConstant(0));
|
||||
Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, NVT, Pair,
|
||||
DAG.getIntPtrConstant(1));
|
||||
}
|
||||
|
||||
SDValue DAGTypeLegalizer::GetVectorElementPointer(SDValue VecPtr, MVT EltVT,
|
||||
SDValue Index) {
|
||||
DebugLoc dl = Index.getDebugLoc();
|
||||
|
Reference in New Issue
Block a user