From: Maciej W. Rozycki Date: Wed, 21 Apr 2021 21:33:02 +0000 (+0200) Subject: VAX: Remove dead `adjacent_operands_p' function X-Git-Tag: upstream/12.2.0~8527 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=436e6f7d85cbd744c3f3aa393043e615dca1d36f;p=platform%2Fupstream%2Fgcc.git VAX: Remove dead `adjacent_operands_p' function This function has never been used and it is unclear what its intended purpose was. gcc/ * config/vax/vax-protos.h (adjacent_operands_p): Remove prototype. * config/vax/vax.c (adjacent_operands_p): Remove. --- diff --git a/gcc/config/vax/vax-protos.h b/gcc/config/vax/vax-protos.h index 89fddec..6dcbf53 100644 --- a/gcc/config/vax/vax-protos.h +++ b/gcc/config/vax/vax-protos.h @@ -24,7 +24,6 @@ extern void vax_expand_prologue (void); extern bool vax_acceptable_pic_operand_p (rtx, bool, bool); extern machine_mode vax_select_cc_mode (enum rtx_code, rtx, rtx); extern const char *cond_name (rtx); -extern bool adjacent_operands_p (rtx, rtx, machine_mode); extern const char *rev_cond_name (rtx); extern void print_operand_address (FILE *, rtx); extern void print_operand (FILE *, rtx, int); diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index 726c371..870af2b 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -2108,79 +2108,6 @@ vax_expand_addsub_di_operands (rtx * operands, enum rtx_code code) } } -bool -adjacent_operands_p (rtx lo, rtx hi, machine_mode mode) -{ - HOST_WIDE_INT lo_offset; - HOST_WIDE_INT hi_offset; - - if (GET_CODE (lo) != GET_CODE (hi)) - return false; - - if (REG_P (lo)) - return mode == SImode && REGNO (lo) + 1 == REGNO (hi); - if (CONST_INT_P (lo)) - return INTVAL (hi) == 0 && UINTVAL (lo) < 64; - if (CONST_INT_P (lo)) - return mode != SImode; - - if (!MEM_P (lo)) - return false; - - if (MEM_VOLATILE_P (lo) || MEM_VOLATILE_P (hi)) - return false; - - lo = XEXP (lo, 0); - hi = XEXP (hi, 0); - - if (GET_CODE (lo) == POST_INC /* || GET_CODE (lo) == PRE_DEC */) - return rtx_equal_p (lo, hi); - - switch (GET_CODE (lo)) - { - case REG: - case SYMBOL_REF: - lo_offset = 0; - break; - case CONST: - lo = XEXP (lo, 0); - /* FALLTHROUGH */ - case PLUS: - if (!CONST_INT_P (XEXP (lo, 1))) - return false; - lo_offset = INTVAL (XEXP (lo, 1)); - lo = XEXP (lo, 0); - break; - default: - return false; - } - - switch (GET_CODE (hi)) - { - case REG: - case SYMBOL_REF: - hi_offset = 0; - break; - case CONST: - hi = XEXP (hi, 0); - /* FALLTHROUGH */ - case PLUS: - if (!CONST_INT_P (XEXP (hi, 1))) - return false; - hi_offset = INTVAL (XEXP (hi, 1)); - hi = XEXP (hi, 0); - break; - default: - return false; - } - - if (GET_CODE (lo) == MULT || GET_CODE (lo) == PLUS) - return false; - - return rtx_equal_p (lo, hi) - && hi_offset - lo_offset == GET_MODE_SIZE (mode); -} - /* Output assembler code for a block containing the constant parts of a trampoline, leaving space for the variable parts. */