https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87065
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- --- gcc/combine.c.jj 2018-08-24 08:55:25.000000000 +0200 +++ gcc/combine.c 2018-08-24 11:00:01.974006314 +0200 @@ -6495,7 +6495,7 @@ simplify_if_then_else (rtx x) pc_rtx, pc_rtx, 0, 0, 0); if (reg_mentioned_p (from, false_rtx)) false_rtx = subst (known_cond (copy_rtx (false_rtx), false_code, - from, false_val), + from, false_val), pc_rtx, pc_rtx, 0, 0, 0); SUBST (XEXP (x, 1), swapped ? false_rtx : true_rtx); @@ -9515,12 +9515,13 @@ known_cond (rtx x, enum rtx_code cond, r if (COMPARISON_P (x)) { if (comparison_dominates_p (cond, code)) - return const_true_rtx; + return (VECTOR_MODE_P (GET_MODE (x)) + ? CONSTM1_RTX (GET_MODE (x)) : const_true_rtx); code = reversed_comparison_code (x, NULL); if (code != UNKNOWN && comparison_dominates_p (cond, code)) - return const0_rtx; + return CONST0_RTX (GET_MODE (x)); else return x; } @@ -9563,7 +9564,7 @@ known_cond (rtx x, enum rtx_code cond, r /* We must simplify subreg here, before we lose track of the original inner_mode. */ new_rtx = simplify_subreg (GET_MODE (x), r, - inner_mode, SUBREG_BYTE (x)); + inner_mode, SUBREG_BYTE (x)); if (new_rtx) return new_rtx; else @@ -9588,7 +9589,7 @@ known_cond (rtx x, enum rtx_code cond, r /* We must simplify the zero_extend here, before we lose track of the original inner_mode. */ new_rtx = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x), - r, inner_mode); + r, inner_mode); if (new_rtx) return new_rtx; else fixes the ICE, but there are other latent issues.