MatzeB wrote: Most of the changes look good to me. I suspect there is ways where `definePhysReg` can change the number of operands of the instruction, making it a necessity to write some of those for loops in this odd style? https://github.com/llvm/llvm-project/pull/74860