This is a second stab at fixing PR31257 (the previous one was D29511). The patch is intended to be applied on top of a revert of r294348.
The idea is to mark registers which are live before the call, but potentially clobbered by it, as imp-used and imp-defined, as a way of keeping them alive. In reality, the registers are not clobbered unless the call is made, in which case it doesn't matter as control leaves the function.
This is the same technique that's used when creating predicated variants of instructions in IfConverter::CopyAndPredicateBlock.
You'll need to add implicit-def as well otherwise the liveness will think later uses are referencing undef values, because this are still clobbered by the TC.
Basically, you've fixed the part of the live-range getting to the TC, but you have to fix part that leaves the TC.