diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-05-13 18:48:15 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-05-13 18:48:15 +0000 |
commit | 0f791f44c72bc5b52dfb31bcf6b6fe4f411d5fd2 (patch) | |
tree | 8c8b7e6b25ae2061b509f3fcbe9f6de0f2731c5f /llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | |
parent | a87b766027322ef8e2fed8843aad5df67a9ecf68 (diff) | |
download | bcm5719-llvm-0f791f44c72bc5b52dfb31bcf6b6fe4f411d5fd2.tar.gz bcm5719-llvm-0f791f44c72bc5b52dfb31bcf6b6fe4f411d5fd2.zip |
[Hexagon] Remove dead nodes from SelectionDAG to avoid cycles
Recent changes to the instruction selection code exposed a problem where
a dead node was not removed on time. This node had both input and output
chains, which lead to an apparent cycle.
llvm-svn: 269458
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp index 734c1b41021..f22e17c296d 100644 --- a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp +++ b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp @@ -654,7 +654,7 @@ bool HexagonDAGToDAGISel::tryLoadOfLoadIntrinsic(LoadSDNode *N) { // This transformation will leave the intrinsic dead. If it remains in // the DAG, the selection code will see it again, but without the load, // and it will generate a store that is normally required for it. - CurDAG->RemoveDeadNodes(); + CurDAG->RemoveDeadNode(C); return true; } @@ -1045,6 +1045,7 @@ void HexagonDAGToDAGISel::SelectZeroExtend(SDNode *N) { void HexagonDAGToDAGISel::SelectIntrinsicWChain(SDNode *N) { if (MachineSDNode *L = LoadInstrForLoadIntrinsic(N)) { StoreInstrForLoadIntrinsic(L, N); + CurDAG->RemoveDeadNode(N); return; } SelectCode(N); |