diff options
author | dim <dim@FreeBSD.org> | 2013-09-22 22:03:30 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-09-22 22:03:30 +0000 |
commit | 340e2ed8dbe5580459203833def634c2888db571 (patch) | |
tree | 9ef0a3c80a9134650d8a3b0ca89909b73f1656a2 /contrib/llvm/lib/Target/SystemZ | |
parent | 733c348ff3f536b89b2147621a7fd3d9ed16640e (diff) | |
download | FreeBSD-src-340e2ed8dbe5580459203833def634c2888db571.zip FreeBSD-src-340e2ed8dbe5580459203833def634c2888db571.tar.gz |
Pull in r191165 from upstream llvm trunk:
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.
Specifically, this fixes the long-standing assertion failure when
compiling the multimedia/gstreamer port on i386. Thanks to Tijl
Coosemans for his help in getting upstream to fix it.
Approved by: re (marius)
Diffstat (limited to 'contrib/llvm/lib/Target/SystemZ')
-rw-r--r-- | contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp index d436ba9..442f0c4 100644 --- a/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp +++ b/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp @@ -540,6 +540,7 @@ SDNode *SystemZDAGToDAGISel::Select(SDNode *Node) { // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); + Node->setNodeId(-1); return 0; } |