As part of putting together the fix in D106557, I noticed that tail duplication looked to be handling debug info poorly - specifically, debug instructions would be dropped instead of being set undef, potentially extending the lifetimes of prior debug values that should be killed. Furthermore, the deleted debug instructions were not necessarily dead - it looks as though the deletion was added to prevent codegen from being affected by debug instructions, resulting in an overly aggressive dropping of debug info. This patch modifies this step to instead make the best attempt to recover debug info without making any codegen changes.
A function has been added to MachineSSAUpdater, GetExistingValueInMiddleOfBlock, which mimics the current GetValueInMiddleOfBlock function but with the addition that it will never generate any instructions, only fetch a vreg if one already exists. This is used to find valid VRegs for debug values, or else set them undef.
Nit, newline between comments and preceeding method. IMO "Same as the above" is easier to read, explicit being better than implicit.