[RegisterCoalescer] Use substPhysReg in reMaterializeTrivialDef

Summary:
When RegisterCoalescer::reMaterializeTrivialDef is substituting
a register use in a DBG_VALUE instruction, and the old register
is a subreg, and the new register is a physical register,
then we need to use substPhysReg in order to extract the correct
subreg.

Reviewers: wmi, aprantl

Reviewed By: wmi

Subscribers: hiraditya, MatzeB, qcolombet, tpr, llvm-commits

Differential Revision: https://reviews.llvm.org/D50844

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340326 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed