[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Aug 5 09:24:09 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.153 -> 1.154
---
Log message:
Fix a latent bug in the libcall inserter that was exposed by Nate's patch
yesterday. This fixes whetstone and a bunch of programs in the External tests.
---
Diffs of the changes: (+3 -6)
LegalizeDAG.cpp | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.153 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.154
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.153 Thu Aug 4 16:43:28 2005
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Aug 5 11:23:57 2005
@@ -1478,7 +1478,6 @@
case ISD::FSIN:
case ISD::FCOS: {
MVT::ValueType VT = Node->getValueType(0);
- Type *T = VT == MVT::f32 ? Type::FloatTy : Type::DoubleTy;
const char *FnName = 0;
switch(Node->getOpcode()) {
case ISD::FSQRT: FnName = VT == MVT::f32 ? "sqrtf" : "sqrt"; break;
@@ -2263,7 +2262,7 @@
/// Found.
static void FindLatestCallSeqStart(SDNode *Node, SDNode *&Found) {
if (Node->getNodeDepth() <= Found->getNodeDepth()) return;
-
+
// If we found an CALLSEQ_START, we already know this node occurs later
// than the Found node. Just remember this node and return.
if (Node->getOpcode() == ISD::CALLSEQ_START) {
@@ -2323,8 +2322,7 @@
assert(TheChain.getValueType() == MVT::Other && "Is not a token chain!");
for (SDNode::use_iterator UI = Node->use_begin(),
- E = Node->use_end(); ; ++UI) {
- assert(UI != E && "Didn't find a user of the tokchain, no CALLSEQ_END!");
+ E = Node->use_end(); UI != E; ++UI) {
// Make sure to only follow users of our token chain.
SDNode *User = *UI;
@@ -2333,8 +2331,7 @@
if (SDNode *Result = FindCallSeqEnd(User))
return Result;
}
- assert(0 && "Unreachable");
- abort();
+ return 0;
}
/// FindCallSeqStart - Given a chained node that is part of a call sequence,
More information about the llvm-commits
mailing list