nikic wrote: I'd probably only leave the canReplaceOperandWithVariable() check -- you're right that we can avoid numbering this way, but given how rare this case should be, it's probably not worth having a duplicate check. https://github.com/llvm/llvm-project/pull/138414