[llvm-commits] [llvm] r47656 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Dan Gohman
gohman at apple.com
Tue Feb 26 17:52:30 PST 2008
Author: djg
Date: Tue Feb 26 19:52:30 2008
New Revision: 47656
URL: http://llvm.org/viewvc/llvm-project?rev=47656&view=rev
Log:
Teach Legalize how to expand an EXTRACT_ELEMENT.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=47656&r1=47655&r2=47656&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Feb 26 19:52:30 2008
@@ -5739,6 +5739,12 @@
#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.
More information about the llvm-commits
mailing list