]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Fix up aarch64_print_operand xzr/wzr case
authorAlex Coplan <alex.coplan@arm.com>
Thu, 2 Nov 2023 22:53:44 +0000 (22:53 +0000)
committerAlex Coplan <alex.coplan@arm.com>
Fri, 15 Dec 2023 19:59:59 +0000 (19:59 +0000)
commit94415eb7a464e855c37ab01ab300fa5e87e4c4a3
treefdadf6ae295f5fd9d9c7220a04b59b7856f48ac7
parent0bd6f7a7496a78832624713f3df64ad17fa0f841
aarch64: Fix up aarch64_print_operand xzr/wzr case

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.

We extract the test into a helper function, aarch64_const_zero_rtx_p, since this
predicate is needed by later patches.

gcc/ChangeLog:

* config/aarch64/aarch64-protos.h (aarch64_const_zero_rtx_p): New.
* config/aarch64/aarch64.cc (aarch64_const_zero_rtx_p): New.
Use it ...
(aarch64_print_operand): ... here.  Recognize CONST0_RTXes in
modes other than VOIDmode.
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64.cc