[NewGVN] Update use counts for SSA copies when replacing them by their operands.

The current code relies on LeaderUseCount to determine if we can remove
an SSA copy, but in that the LeaderUseCount does not refer to the SSA
copy. If a SSA copy is a dominating leader, we use the operand as dominating
leader instead. This means we removed a user of a ssa copy and we should
decrement its use count, so we can remove the ssa copy once it becomes dead.

Fixes PR38804.

Reviewers: efriedma, davide

Reviewed By: davide

Differential Revision: https://reviews.llvm.org/D51595


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349217 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed