Related to D60656. This adds a WithOverflowInst class with a few helper methods to get the underlying binop, signedness and nowrap type and makes use of it where sensible. I think the result is pretty nice and there will be two more uses in D60650/D60656.
The refactorings are all NFC, though I left a couple of TODOs where things could be improved. In particular we have two places where add/sub are handled but mul isn't.
As a followup for this, I believe it would be good to add PatternMatch support for m_ExtractValue() and m_WithOverflow(), so you can write something like m_ExtractValue(m_WithOverflow(WO), 0), which is a common pattern.
If you don't intend to look into that, could you please file a bug, if there isn't one already?