# Fix PR rtl-optimization/60818, taken from the trunk. gcc/ 2017-04-04 Segher Boessenkool PR rtl-optimization/60818 * simplify-rtx.c (simplify_binary_operation_1): Do not replace a compare of comparisons with the thing compared if this results in a different machine mode. --- a/src/gcc/simplify-rtx.c 2017/04/03 22:57:32 246665 +++ b/src/gcc/simplify-rtx.c 2017/04/04 00:10:02 246666 @@ -2306,10 +2306,10 @@ return xop00; if (REG_P (xop00) && REG_P (xop10) - && GET_MODE (xop00) == GET_MODE (xop10) && REGNO (xop00) == REGNO (xop10) - && GET_MODE_CLASS (GET_MODE (xop00)) == MODE_CC - && GET_MODE_CLASS (GET_MODE (xop10)) == MODE_CC) + && GET_MODE (xop00) == mode + && GET_MODE (xop10) == mode + && GET_MODE_CLASS (mode) == MODE_CC) return xop00; } break;