diff options
author | Tim Northover <tnorthover@apple.com> | 2013-09-22 08:21:56 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2013-09-22 08:21:56 +0000 |
commit | 31d093c70564fe6afbaf63beaa76eb5b47ac4f47 (patch) | |
tree | cee4edf4a1f1ca0105476cd7db42dedfa4af16be /llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | |
parent | cb1dca602c436c80c6923e106c9a9d8fc2353e8c (diff) | |
download | bcm5719-llvm-31d093c70564fe6afbaf63beaa76eb5b47ac4f47.tar.gz bcm5719-llvm-31d093c70564fe6afbaf63beaa76eb5b47ac4f47.zip |
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
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp index ee819e088d8..a8655649f19 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp @@ -396,6 +396,7 @@ SDNode *AArch64DAGToDAGISel::Select(SDNode *Node) { if (Node->isMachineOpcode()) { DEBUG(dbgs() << "== "; Node->dump(CurDAG); dbgs() << "\n"); + Node->setNodeId(-1); return NULL; } |