+2017-10-13 Richard Sandiford <richard.sandiford@linaro.org>
+ Alan Hayward <alan.hayward@arm.com>
+ David Sherwood <david.sherwood@arm.com>
+
+ * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
+ (expand_debug_source_expr): Likewise.
+ * combine.c (combine_simplify_rtx): Likewise.
+ * cse.c (fold_rtx): Likewise.
+ * fwprop.c (canonicalize_address): Likewise.
+ * targhooks.c (default_shift_truncation_mask): Likewise.
+
2017-10-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
if (FLOAT_MODE_P (mode) && FLOAT_MODE_P (inner_mode))
{
- if (GET_MODE_BITSIZE (mode) == GET_MODE_BITSIZE (inner_mode))
+ if (GET_MODE_UNIT_BITSIZE (mode)
+ == GET_MODE_UNIT_BITSIZE (inner_mode))
op0 = simplify_gen_subreg (mode, op0, inner_mode, 0);
- else if (GET_MODE_BITSIZE (mode) < GET_MODE_BITSIZE (inner_mode))
+ else if (GET_MODE_UNIT_BITSIZE (mode)
+ < GET_MODE_UNIT_BITSIZE (inner_mode))
op0 = simplify_gen_unary (FLOAT_TRUNCATE, mode, op0, inner_mode);
else
op0 = simplify_gen_unary (FLOAT_EXTEND, mode, op0, inner_mode);
if (FLOAT_MODE_P (mode) && FLOAT_MODE_P (inner_mode))
{
- if (GET_MODE_BITSIZE (mode) == GET_MODE_BITSIZE (inner_mode))
+ if (GET_MODE_UNIT_BITSIZE (mode)
+ == GET_MODE_UNIT_BITSIZE (inner_mode))
op0 = simplify_gen_subreg (mode, op0, inner_mode, 0);
- else if (GET_MODE_BITSIZE (mode) < GET_MODE_BITSIZE (inner_mode))
+ else if (GET_MODE_UNIT_BITSIZE (mode)
+ < GET_MODE_UNIT_BITSIZE (inner_mode))
op0 = simplify_gen_unary (FLOAT_TRUNCATE, mode, op0, inner_mode);
else
op0 = simplify_gen_unary (FLOAT_EXTEND, mode, op0, inner_mode);
SUBST (XEXP (x, 1),
force_to_mode (XEXP (x, 1), GET_MODE (XEXP (x, 1)),
(HOST_WIDE_INT_1U
- << exact_log2 (GET_MODE_BITSIZE (GET_MODE (x))))
+ << exact_log2 (GET_MODE_UNIT_BITSIZE
+ (GET_MODE (x))))
- 1,
0));
break;
{
if (SHIFT_COUNT_TRUNCATED)
canon_const_arg1 = GEN_INT (INTVAL (const_arg1)
- & (GET_MODE_BITSIZE (mode)
+ & (GET_MODE_UNIT_BITSIZE (mode)
- 1));
else
break;
{
if (SHIFT_COUNT_TRUNCATED)
inner_const = GEN_INT (INTVAL (inner_const)
- & (GET_MODE_BITSIZE (mode) - 1));
+ & (GET_MODE_UNIT_BITSIZE (mode)
+ - 1));
else
break;
}
/* As an exception, we can turn an ASHIFTRT of this
form into a shift of the number of bits - 1. */
if (code == ASHIFTRT)
- new_const = GEN_INT (GET_MODE_BITSIZE (mode) - 1);
+ new_const = GEN_INT (GET_MODE_UNIT_BITSIZE (mode) - 1);
else if (!side_effects_p (XEXP (y, 0)))
return CONST0_RTX (mode);
else
{
case ASHIFT:
if (CONST_INT_P (XEXP (x, 1))
- && INTVAL (XEXP (x, 1)) < GET_MODE_BITSIZE (GET_MODE (x))
- && INTVAL (XEXP (x, 1)) >= 0)
+ && INTVAL (XEXP (x, 1)) < GET_MODE_UNIT_BITSIZE (GET_MODE (x))
+ && INTVAL (XEXP (x, 1)) >= 0)
{
HOST_WIDE_INT shift = INTVAL (XEXP (x, 1));
PUT_CODE (x, MULT);
unsigned HOST_WIDE_INT
default_shift_truncation_mask (machine_mode mode)
{
- return SHIFT_COUNT_TRUNCATED ? GET_MODE_BITSIZE (mode) - 1 : 0;
+ return SHIFT_COUNT_TRUNCATED ? GET_MODE_UNIT_BITSIZE (mode) - 1 : 0;
}
/* The default implementation of TARGET_MIN_DIVISIONS_FOR_RECIP_MUL. */