From 1953ecb0a6fc8520b34b52fd04f7476a7eb4613f Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 27 Feb 2008 01:52:30 +0000 Subject: [PATCH] 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 --- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index f4a2bc0b960..32b210114a0 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(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. -- 2.34.1