===================================================================
@@ -417,6 +417,11 @@ gen_rtx_CONST_INT (enum machine_mode mod
rtx
gen_int_mode (HOST_WIDE_INT c, enum machine_mode mode)
{
+ /* CONST_INT is used for CC modes too. We can't make any assumptions
+ about the precision or bitsize in that case, so just pass the value
+ through unchanged. */
+ if (GET_MODE_CLASS (mode) == MODE_CC)
+ return GEN_INT (c);
return GEN_INT (trunc_int_for_mode (c, mode));
}
===================================================================
@@ -1354,6 +1354,11 @@ try_const_anchors (rtx src_const, enum m
rtx lower_exp = NULL_RTX, upper_exp = NULL_RTX;
unsigned lower_old, upper_old;
+ /* CONST_INT is used for CC modes, but we should leave those alone. */
+ if (GET_MODE_CLASS (mode) == MODE_CC)
+ return NULL_RTX;
+
+ gcc_assert (SCALAR_INT_MODE_P (mode));
if (!compute_const_anchors (src_const, &lower_base, &lower_offs,
&upper_base, &upper_offs))
return NULL_RTX;