[LoopPeel] Handle non-local instructions/arguments when updating exiting values (#142993)
Similar to
https://github.com/llvm/llvm-project/commit/7e14161f49b32387988cf9d937bbfaa27d0fbdd5,
the exiting value may be a non-local instruction or an argument.
Closes https://github.com/llvm/llvm-project/issues/142895.