It turns out addLiveOutsNoPristines missed to add non-pristine callee saved registers in the return block. This probably went unnoticed, because we usually start walking backwards from the block end and at the time we actually queried/looked at the information we were before the epilogue code and it didn't matter anymore. This of course was not true for shrink-wrapping situations leading to bugs like the example in D32156.
In this patch:
- addLiveOutsNoPristines() needs to add callee saved registers that are actually saved and restored somewhere to the set (they are not pristine).
- Cleanup/rewrite the code for addLiveOuts()/addLiveOutsNoPristines().
This fixes the problem from D32156.