diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-01-31 18:14:25 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-01-31 18:14:25 +0000 |
commit | 2443ab932d2a57e9a0b10dab4d53e11b11a0de99 (patch) | |
tree | 5418ec9fead05e5eed000160f5c31d4d15a4e40f /llvm/lib/CodeGen/SelectionDAG | |
parent | 0962ffc4a63400746b0548d95b77d35aa276a69c (diff) | |
download | bcm5719-llvm-2443ab932d2a57e9a0b10dab4d53e11b11a0de99.tar.gz bcm5719-llvm-2443ab932d2a57e9a0b10dab4d53e11b11a0de99.zip |
Allow custom lowering of fabs. I forgot to check in this change which
caused several test failures.
llvm-svn: 25852
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index f09fa625006..02031eccea9 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -2022,9 +2022,14 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { switch (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0))) { case TargetLowering::Promote: case TargetLowering::Custom: - assert(0 && "Cannot promote/custom handle this yet!"); + isCustom = true; + // FALLTHROUGH case TargetLowering::Legal: Result = DAG.UpdateNodeOperands(Result, Tmp1); + if (isCustom) { + Tmp1 = TLI.LowerOperation(Result, DAG); + if (Tmp1.Val) Result = Tmp1; + } break; case TargetLowering::Expand: switch (Node->getOpcode()) { |