Alex Coplan <alex.cop...@arm.com> writes:
> This adjusts aarch64_print_operand to recognize zero rtxes in modes other than
> VOIDmode.  This allows us to use xzr/wzr for zero vectors, for example.
>
> Bootstrapped/regtested as a series on aarch64-linux-gnu, OK for trunk?
>
> gcc/ChangeLog:
>
>       * config/aarch64/aarch64.cc (aarch64_print_operand): Handle
>       non-VOIDmode CONST0_RTXes in {x,w}zr cases.

OK (and a good sign!)

Thanks,
Richard

> ---
>  gcc/config/aarch64/aarch64.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
> index 800a8b0e110..abd029887e5 100644
> --- a/gcc/config/aarch64/aarch64.cc
> +++ b/gcc/config/aarch64/aarch64.cc
> @@ -12387,7 +12387,7 @@ aarch64_print_operand (FILE *f, rtx x, int code)
>  
>      case 'w':
>      case 'x':
> -      if (x == const0_rtx
> +      if (x == CONST0_RTX (GET_MODE (x))
>         || (CONST_DOUBLE_P (x) && aarch64_float_const_zero_rtx_p (x)))
>       {
>         asm_fprintf (f, "%czr", code);

Reply via email to