From 31d093c70564fe6afbaf63beaa76eb5b47ac4f47 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Sun, 22 Sep 2013 08:21:56 +0000 Subject: ISelDAG: spot chain cycles involving MachineNodes Previously, the DAGISel function WalkChainUsers was spotting that it had entered already-selected territory by whether a node was a MachineNode (amongst other things). Since it's fairly common practice to insert MachineNodes during ISelLowering, this was not the correct check. Looking around, it seems that other nodes get their NodeId set to -1 upon selection, so this makes sure the same thing happens to all MachineNodes and uses that characteristic to determine whether we should stop looking for a loop during selection. This should fix PR15840. llvm-svn: 191165 --- llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp') diff --git a/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp b/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp index 543f54c9c1b..4152829b60d 100644 --- a/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp +++ b/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp @@ -395,6 +395,7 @@ SDNode *MSP430DAGToDAGISel::Select(SDNode *Node) { DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); + Node->setNodeId(-1); return NULL; } -- cgit v1.2.3