aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-01-31 18:14:25 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-01-31 18:14:25 +0000
commit59ad781e0118021d1ca7dfbc9f8db2ed828745e0 (patch)
tree487cf9eb0bf3561f98790a9fe27d066110861126
parentc03468bafab3a20fdaa1c05d6c7f2ae1264fc3ea (diff)
Allow custom lowering of fabs. I forgot to check in this change which
caused several test failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25852 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index f09fa62500..02031eccea 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/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()) {