[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Sep 15 17:21:59 PDT 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.394 -> 1.395
---
Log message:
simplify control flow, no functionality change
---
Diffs of the changes: (+12 -6)
LegalizeDAG.cpp | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.394 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.395
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.394 Fri Sep 15 19:09:24 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Sep 15 19:21:44 2006
@@ -4723,22 +4723,28 @@
LH.getOpcode() == ISD::SRA && LH.getOperand(0) == LL &&
LH.getOperand(1).getOpcode() == ISD::Constant &&
cast<ConstantSDNode>(LH.getOperand(1))->getValue() == SH) {
+ // FIXME: Move this to the dag combiner.
+
+ // Low part:
+ Lo = DAG.getNode(ISD::MUL, NVT, LL, RL);
+ // High part:
Hi = DAG.getNode(ISD::MULHS, NVT, LL, RL);
- UseLibCall = false;
+ break;
} else if (HasMULHU) {
+ // Low part:
+ Lo = DAG.getNode(ISD::MUL, NVT, LL, RL);
+
+ // High part:
Hi = DAG.getNode(ISD::MULHU, NVT, LL, RL);
RH = DAG.getNode(ISD::MUL, NVT, LL, RH);
LH = DAG.getNode(ISD::MUL, NVT, LH, RL);
Hi = DAG.getNode(ISD::ADD, NVT, Hi, RH);
Hi = DAG.getNode(ISD::ADD, NVT, Hi, LH);
- UseLibCall = false;
+ break;
}
- if (!UseLibCall)
- Lo = DAG.getNode(ISD::MUL, NVT, LL, RL);
}
- if (UseLibCall)
- Lo = ExpandLibCall("__muldi3" , Node, Hi);
+ Lo = ExpandLibCall("__muldi3" , Node, Hi);
break;
}
case ISD::SDIV: Lo = ExpandLibCall("__divdi3" , Node, Hi); break;
More information about the llvm-commits
mailing list