This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Prevent Stale nodes from entering worklist
ClosedPublic

Authored by niravd on Mar 1 2017, 10:50 AM.

Details

Summary

Add check that deleted nodes do not get added to worklist. This can
occur when a node's operand is simplified to an existing node.

This fixes PR32108.

Diff Detail

Repository
rL LLVM

Event Timeline

niravd created this revision.Mar 1 2017, 10:50 AM
hfinkel added inline comments.Mar 1 2017, 10:59 AM
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
137 ↗(On Diff #90209)

What does "causes redundancies" mean?

jyknight added inline comments.Mar 1 2017, 11:40 AM
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
137 ↗(On Diff #90209)

I'd suggest to put an assert here instead, and put an if (opcode==ISD::DELETED_NODE) in the caller that requires it.

niravd updated this revision to Diff 90217.Mar 1 2017, 12:12 PM

Move check to offending line and add assertion to AddToWorklist

niravd marked 2 inline comments as done.Mar 1 2017, 12:12 PM
hfinkel accepted this revision.Mar 1 2017, 12:28 PM

LGTM

This revision is now accepted and ready to land.Mar 1 2017, 12:28 PM
This revision was automatically updated to reflect the committed changes.