diff options
author | Dan Gohman <gohman@apple.com> | 2008-02-27 01:52:30 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-02-27 01:52:30 +0000 |
commit | 1953ecb0a6fc8520b34b52fd04f7476a7eb4613f (patch) | |
tree | b121583d678c6481bd798f17b4e72420456c70c3 /lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | b3564aa8367fc38efdab0a812868f6f93b9d883e (diff) |
Teach Legalize how to expand an EXTRACT_ELEMENT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index f4a2bc0b96..32b210114a 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -5739,6 +5739,12 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){ #endif assert(0 && "Do not know how to expand this operator!"); abort(); + case ISD::EXTRACT_ELEMENT: + ExpandOp(Node->getOperand(0), Lo, Hi); + if (cast<ConstantSDNode>(Node->getOperand(1))->getValue()) + return ExpandOp(Hi, Lo, Hi); + else + return ExpandOp(Lo, Lo, Hi); case ISD::EXTRACT_VECTOR_ELT: assert(VT==MVT::i64 && "Do not know how to expand this operator!"); // ExpandEXTRACT_VECTOR_ELT tolerates invalid result types. |