AZero13 wrote: > X86 does this for SUB at the start of `X86InstrInfo::optimizeCompareInstr` by marking SUB instructions with `isCompare` in tablegen. That is going to be a bigger overhaul. This is something smaller first. https://github.com/llvm/llvm-project/pull/155530