When we see
%sub = G_SUB 0, %x %select = G_SELECT %cc, %t, %sub
Fold away the G_SUB by producing
%select = CSNEG %t, %x, cc
Simple IR example: https://godbolt.org/z/K8TEnh
This is valid on both sides of the select, but for now, just handle one side. It may make more sense to handle swapping sides during post-legalizer lowering.
I committed a patch to recognize a negate idiom for G_PTR_ADD in ad376657c1ec4da950d18b37b523585ccd4fc7bb, maybe you can re-use that as a helper, or just copy the MI PatternMatch code since its only a few lines.