[DebugInfo] Clear subreg in setDebugValueUndef()
When switching the register debug operands to $noreg in setupDebugValueUndef() also clear the sub-register indices for virtual registers. This is done when marking DBG_VALUEs undef in other cases, e.g. in LiveDebugVariables. I have not found any cases where leaving the sub-register index causes any issues, and the indices would eventually get dropped when LiveDebugVariables reinserted the undef DBG_VALUEs after register scheduling, but if nothing else it looked a bit weird in printouts to have sub-register indices on $noreg, and I don't think the sub-register index holds any meaningful information at that point. I have not been able to find any source-level reproducer for this with an upstream target, so I have just added an instrumented machine-sink test. Reviewed By: djtodoro, jmorse Differential Revision: https://reviews.llvm.org/D89941
Loading
Please sign in to comment