[llvm-commits] [llvm] r92988 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp test/CodeGen/X86/2010-01-07-ISelBug.ll
Dan Gohman
gohman at apple.com
Thu Jan 7 18:44:52 PST 2010
On Jan 7, 2010, at 6:36 PM, Evan Cheng wrote:
>
>
> if (N->use_empty() && N != CurDAG->getRoot().getNode()) {
> - CurDAG->DeleteNode(N);
> + if (N->getOpcode() != ISD::DELETED_NODE)
> + CurDAG->DeleteNode(N);
This isn't safe. A node's opcode is only set to DELETED_NODE when it
is actually being deallocated. You can't count on it staying set because
the node could get re-allocated for another purpose at any time.
Dan
More information about the llvm-commits
mailing list