NewGVN: Fix bug exposed by PR31761

Summary:
This does not actually fix the testcase in PR31761 (discussion is
ongoing on the testcase), but does fix a bug it exposes, where stores
were not properly clobbering loads.

We accomplish this by unifying the memory equivalence infratructure
back into the normal congruence infrastructure, and then properly
destroying congruence classes when memory state leaders disappear.

Reviewers: davide

Subscribers: llvm-commits

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

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