This is a follow on to D114176. It adds the missing piece to actually build a new expression for the LHS using the newly discovered flag information.
I need to add a few more tests, before this lands. In the meantime, a question for the reviewers: is the approach of removing nodes from UniqueSCEVs reasonable? This has some serious downsides (breaking equality), but the other option requires a ton of duplicated code. Anyone see any other ideas?