When determining the replacement access during cloning, we currently
leave accesses for instructions that are not in the VMap alone. This is
correct if the instruction is not in VMap because it hasn't been cloned,
but not if it has been cloned and then removed. In that case, we should
walk up to the defining access, like in other simplification cases.
To distinguish the two cases, pass in a callback that queries whether
the instruction is part of the cloned region.
An alternative to this would be to delay removal of dead instructions in
SimpleLoopUnswitch until after MSSA cloning.
Fixes https://github.com/llvm/llvm-project/issues/116228.