aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-09-22 22:03:30 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-09-22 22:03:30 +0000
commit462fc0e072c0fa643856f19d032b0fba8031e3ab (patch)
tree9ef0a3c80a9134650d8a3b0ca89909b73f1656a2 /contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
parent7b07722f6ca858f518baae778aa31c381b9bd6d4 (diff)
downloadsrc-462fc0e072c0fa643856f19d032b0fba8031e3ab.tar.gz
src-462fc0e072c0fa643856f19d032b0fba8031e3ab.zip
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)
Notes
Notes: svn path=/head/; revision=255804
Diffstat (limited to 'contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp')
-rw-r--r--contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp b/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
index 54ca2c97ea02..491ccc4142b3 100644
--- a/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
+++ b/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
@@ -1334,8 +1334,10 @@ SDNode *HexagonDAGToDAGISel::SelectAdd(SDNode *N) {
SDNode *HexagonDAGToDAGISel::Select(SDNode *N) {
- if (N->isMachineOpcode())
+ if (N->isMachineOpcode()) {
+ N->setNodeId(-1);
return NULL; // Already selected.
+ }
switch (N->getOpcode()) {