This is the common case in the BE when we serialize condition and then rematerialize it. Use either original or inverted condition.
sext part? I did not check, I have just indented existing code here. Although I doubt. The target specific part here is call to isBoolSGPR for both sext and select part.