* [PATCH 06/11] aarch64: Fix up aarch64_print_operand xzr/wzr case
@ 2023-11-16 18:08 Alex Coplan
2023-11-21 12:11 ` Richard Sandiford
0 siblings, 1 reply; 2+ messages in thread
From: Alex Coplan @ 2023-11-16 18:08 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Sandiford, Kyrylo Tkachov
[-- Attachment #1: Type: text/plain, Size: 436 bytes --]
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.
---
gcc/config/aarch64/aarch64.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[-- Attachment #2: 0006-aarch64-Fix-up-aarch64_print_operand-xzr-wzr-case.patch --]
[-- Type: text/x-patch, Size: 465 bytes --]
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 06/11] aarch64: Fix up aarch64_print_operand xzr/wzr case
2023-11-16 18:08 [PATCH 06/11] aarch64: Fix up aarch64_print_operand xzr/wzr case Alex Coplan
@ 2023-11-21 12:11 ` Richard Sandiford
0 siblings, 0 replies; 2+ messages in thread
From: Richard Sandiford @ 2023-11-21 12:11 UTC (permalink / raw)
To: Alex Coplan; +Cc: gcc-patches, Kyrylo Tkachov
Alex Coplan <alex.coplan@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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-21 12:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-16 18:08 [PATCH 06/11] aarch64: Fix up aarch64_print_operand xzr/wzr case Alex Coplan
2023-11-21 12:11 ` Richard Sandiford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).