ilovepi wrote: Yes, that seems to be why. For GVNSink, I'd guess its still better to skip numbering those instructions, but maybe the check in `canReplaceOperandWithVariable()` should be updated too? https://github.com/llvm/llvm-project/pull/138414