Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.390 -> 1.391 --- Log message: Allow targets to custom lower expanded BIT_CONVERT's --- Diffs of the changes: (+15 -2) LegalizeDAG.cpp | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.390 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.391 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.390 Fri Sep 1 13:17:58 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Sep 8 19:20:27 2006 @@ -4457,8 +4457,21 @@ break; case ISD::BIT_CONVERT: { - SDOperand Tmp = ExpandBIT_CONVERT(Node->getValueType(0), - Node->getOperand(0)); + SDOperand Tmp; + if (TLI.getOperationAction(ISD::BIT_CONVERT, VT) == TargetLowering::Custom){ + // If the target wants to, allow it to lower this itself. + switch (getTypeAction(Node->getOperand(0).getValueType())) { + case Expand: assert(0 && "cannot expand FP!"); + case Legal: Tmp = LegalizeOp(Node->getOperand(0)); break; + case Promote: Tmp = PromoteOp (Node->getOperand(0)); break; + } + Tmp = TLI.LowerOperation(DAG.getNode(ISD::BIT_CONVERT, VT, Tmp), DAG); + } + + // Turn this into a load/store pair by default. + if (Tmp.Val == 0) + Tmp = ExpandBIT_CONVERT(Node->getValueType(0), Node->getOperand(0)); + ExpandOp(Tmp, Lo, Hi); break; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits