The dag combiner is missing revisiting nodes that it really should, and thus leaving
dead stuff around. This gets fed into the isel pass and causes certain foldings from happening because nodes have extraneous uses floating around. For example, if we turned foo(bar(x)) -> baz(x), we sometimes left bar(x) around. llvm-svn: 46305
This commit is contained in:
parent
0feb1b0f84
commit
d66eac62fd
|
@ -607,6 +607,11 @@ void DAGCombiner::Run(bool RunningAfterLegalize) {
|
||||||
AddToWorkList(RV.Val);
|
AddToWorkList(RV.Val);
|
||||||
AddUsersToWorkList(RV.Val);
|
AddUsersToWorkList(RV.Val);
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
|
||||||
// Nodes can be reintroduced into the worklist. Make sure we do not
|
// Nodes can be reintroduced into the worklist. Make sure we do not
|
||||||
// process a node that has been replaced.
|
// process a node that has been replaced.
|
||||||
removeFromWorkList(N);
|
removeFromWorkList(N);
|
||||||
|
|
Loading…
Reference in New Issue