summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-05 16:23:57 +0000
committerChris Lattner <sabre@nondot.org>2005-08-05 16:23:57 +0000
commitcabdc34563b5b3d9229889d6fa118dfd1b2b0458 (patch)
tree5ae13756dedbabe87999a20a247a1948470b564a /llvm/lib/CodeGen
parent8c636bf8b2ec58ce1d81951789480eca440419ce (diff)
downloadbcm5719-llvm-cabdc34563b5b3d9229889d6fa118dfd1b2b0458.tar.gz
bcm5719-llvm-cabdc34563b5b3d9229889d6fa118dfd1b2b0458.zip
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. llvm-svn: 22678
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 802aba8f490..147692bb269 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1478,7 +1478,6 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
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 @@ bool SelectionDAGLegalize::ExpandShift(unsigned Opc, SDOperand Op,SDOperand Amt,
/// 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 @@ static SDNode *FindCallSeqEnd(SDNode *Node) {
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 @@ static SDNode *FindCallSeqEnd(SDNode *Node) {
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,
OpenPOWER on IntegriCloud