[PATCH AArch64]Fix test failure for pr84682-2.c
Richard Sandiford
richard.sandiford@arm.com
Wed Aug 29 18:47:00 GMT 2018
Joey Ye <joey.ye.cc@gmail.com> writes:
> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
> index 07c55b1..9e965ab 100644
> --- a/gcc/config/aarch64/aarch64.c
> +++ b/gcc/config/aarch64/aarch64.c
> @@ -5674,9 +5674,6 @@ aarch64_classify_address (struct aarch64_address_info *info,
> && (code != POST_INC && code != REG))
> return false;
>
> - gcc_checking_assert (GET_MODE (x) == VOIDmode
> - || SCALAR_INT_MODE_P (GET_MODE (x)));
> -
> switch (code)
> {
> case REG:
> diff --git a/gcc/recog.c b/gcc/recog.c
> index 0a8fa2c..510aba2 100644
> --- a/gcc/recog.c
> +++ b/gcc/recog.c
> @@ -1070,6 +1070,11 @@ general_operand (rtx op, machine_mode mode)
> int
> address_operand (rtx op, machine_mode mode)
> {
> + /* Wrong mode for an address expr. */
> + if (GET_MODE (op) != VOIDmode
> + && ! SCALAR_INT_MODE_P (GET_MODE (op)))
> + return false;
> +
> return memory_address_p (mode, op);
> }
>
The address_operand part is OK, thanks.
I think we should keep the assert in aarch64_classify_address, since
IMO it's a bug for anything else to reach that point.
Richard
More information about the Gcc-patches
mailing list