When zext is EvaluatedInDifferentType, InstCombine
drops the dbg.value intrinsic. This patch tries to
preserve said DI, by inserting the zext's old DI in the
resulting instruction.
The current implementation works only for integer
non-vector variables, but this should get extendet to work for
every case.
There should be a helper function that cuts down on the boilerplate needed to insert fresh debug values.
Here's the usage I envision:
@aprantl, @mattd and others: wdyt?