[llvm-commits] [llvm] r46305 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Chris Lattner
clattner at apple.com
Thu Jan 24 09:06:48 PST 2008
On Jan 24, 2008, at 1:05 AM, Duncan Sands wrote:
> Hi Chris,
>
>> + // Add any uses of the old node to the worklist if they
>> have a single
>> + // use. They may be dead after this node is deleted.
>> + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i)
>> + AddToWorkList(N->getOperand(i).Val);
>
> the comment says "if they have a single use", but the operands are
> added
> unconditionally...
Nice catch. The issue is that a node can use another node multiple
times (add x, x). I'll update the comment, thanks.
-Chris
More information about the llvm-commits
mailing list