diff options
author | Dan Gohman <gohman@apple.com> | 2009-04-25 17:55:53 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-04-25 17:55:53 +0000 |
commit | 2bee0afb7d023e029975abf7d3157759fa797d37 (patch) | |
tree | 7c1667dcb579753afaf3fa8691292893f89f2769 /lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp | |
parent | 2fe4d0aacbc810a4e3838335648aef1f59bb0646 (diff) | |
download | external_llvm-2bee0afb7d023e029975abf7d3157759fa797d37.zip external_llvm-2bee0afb7d023e029975abf7d3157759fa797d37.tar.gz external_llvm-2bee0afb7d023e029975abf7d3157759fa797d37.tar.bz2 |
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
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp b/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp index 7826270..e8ff3fc 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp @@ -135,16 +135,11 @@ void DAGTypeLegalizer::ExpandRes_EXTRACT_ELEMENT(SDNode *N, SDValue &Lo, GetExpandedOp(N->getOperand(0), Lo, Hi); SDValue Part = cast<ConstantSDNode>(N->getOperand(1))->getZExtValue() ? Hi : Lo; - DebugLoc dl = N->getDebugLoc(); assert(Part.getValueType() == N->getValueType(0) && "Type twice as big as expanded type not itself expanded!"); - MVT NVT = TLI.getTypeToTransformTo(N->getValueType(0)); - Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, NVT, Part, - DAG.getConstant(0, TLI.getPointerTy())); - Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, NVT, Part, - DAG.getConstant(1, TLI.getPointerTy())); + GetPairElements(Part, Lo, Hi); } void DAGTypeLegalizer::ExpandRes_EXTRACT_VECTOR_ELT(SDNode *N, SDValue &Lo, |