There's a duplicated redundant condition in compare-elim.c, line 148: if (REG_P (XEXP (src, 0)) && REG_P (XEXP (src, 0)) && (REG_P (XEXP (src, 1)) || CONSTANT_P (XEXP (src, 1)))) return src; This can be simplified: if (REG_P (XEXP (src, 0)) && (REG_P (XEXP (src, 1)) || CONSTANT_P (XEXP (src, 1)))) return src; I think care must be taken to ensure that this is indeed duplicated and that the developer didn't intend to write something else instead.
The code in conforming_compare matches this comment with or without the duplicate test: (1) All comparison patterns are represented as [(set (reg:CC) (compare:CC (reg) (immediate)))] so it looks like it could be removed.
Eric fixed this as part of the compare-elim revamp last year.