[DebugInfo][InstrRef] Avoid a crash during DBG_PHI maintenence
With D110105, the isDebug flag for register uses is now a proxy for whether the instruction is a debug instruction; that causes DBG_PHIs to have their operands updated by calls to updateDbgUsersToReg, which is the correct behaviour. However: that function only expects to receive DBG_VALUE instructions and asserts such. This patch splits the updating-action into a lambda, and applies it to the appropriate operands for each kind of debug instruction. Tested with an ARM test that stimulates this function: I've added some DBG_PHI instructions that should be updated in the same way as DBG_VALUEs. Differential Revision: https://reviews.llvm.org/D108641
Loading
Please register or sign in to comment