1. [SelectionDAG] Check any use of negation result before removal (details)
Commit a2fb5446be960ad164060b3c05fc268f7f72d67a by qiucofan
[SelectionDAG] Check any use of negation result before removal

2508ef01 fixed a bug about constant removal in negation. But after
sanitizing check I found there's still some issue about it so it's

Temporary nodes will be removed if useless in negation. Before the
removal, they'd be checked if any other nodes used it. So the removal
was moved after getNode. However in rare cases the node to be removed is
the same as result of getNode. We missed that and will be fixed by this

Reviewed By: steven.zhang

Differential Revision:
The file was addedllvm/test/CodeGen/X86/pr47517.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp (diff)