This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH AArch64]Fix test failure for pr84682-2.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]