[DAGCombine] Remove dead node when it is created by getNegatedExpression
authorQingShan Zhang <qshanz@cn.ibm.com>
Mon, 24 Aug 2020 02:50:58 +0000 (02:50 +0000)
committerQingShan Zhang <qshanz@cn.ibm.com>
Mon, 24 Aug 2020 02:50:58 +0000 (02:50 +0000)
commit960cbc53ca170c8c605bf83fa63b49ab27a56f65
tree927524a1af316f2a800b78a139ad72f0d2ad193f
parent41ba9d77231eac32f8a022eedffd261c47020dd4
[DAGCombine] Remove dead node when it is created by getNegatedExpression

We hit the compiling time reported by https://bugs.llvm.org/show_bug.cgi?id=46877
and the reason is the same as D77319. So we need to remove the dead node we created
to avoid increase the problem size of DAGCombiner.

Reviewed By: Spatel

Differential Revision: https://reviews.llvm.org/D86183
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/X86/pr46877.ll [new file with mode: 0644]