OverDefinedCache contains a set of values that are overdefined in a given basic block. However, we don't reliably update the set when one of the values is erased.
This is really two fixes: one, add a PoisoningVH to catch the issue, and two, fix the resulting issue.
I'm posting this now for two reasons: one, to verify this actually fixes https://bugs.llvm.org/show_bug.cgi?id=43909, and two, to ask for ideas on how to improve the algorithm. The current implementation is really inefficient, but I'm not sure what the best approach looks like.
I haven't reduced the testcase yet.
Fixes https://bugs.llvm.org/show_bug.cgi?id=43909 (hopefully).