The LIT test cases were migrated with the script provided by
Nikita Popov.
No manual changes were made. Committed without review since
no functional changes, after consultation with uweigand.
Previously, we would hit UB (or the ISD::DELETED_NODE assert) if we
happened to replace a node during UpdateChains, because it would be
left in the list we were iterating over. This nulls out the pointer
when that happens so that we can avoid the issue.
Fixes llvm.org/PR31710
llvm-svn: 293522