===================================================================
@@ -3619,21 +3619,22 @@ simplify_binary_operation_1 (enum rtx_co
i - in_n_elts);
}
}
return gen_rtx_CONST_VECTOR (mode, v);
}
/* Try to merge VEC_SELECTs from the same vector into a single one. */
if (GET_CODE (trueop0) == VEC_SELECT
&& GET_CODE (trueop1) == VEC_SELECT
- && rtx_equal_p (XEXP (trueop0, 0), XEXP (trueop1, 0)))
+ && rtx_equal_p (XEXP (trueop0, 0), XEXP (trueop1, 0))
+ && GET_MODE (XEXP (trueop0, 0)) == mode)
{
rtx par0 = XEXP (trueop0, 1);
rtx par1 = XEXP (trueop1, 1);
int len0 = XVECLEN (par0, 0);
int len1 = XVECLEN (par1, 0);
rtvec vec = rtvec_alloc (len0 + len1);
for (int i = 0; i < len0; i++)
RTVEC_ELT (vec, i) = XVECEXP (par0, 0, i);
for (int i = 0; i < len1; i++)
RTVEC_ELT (vec, len0 + i) = XVECEXP (par1, 0, i);