public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Matthew Malcomson <matmal01@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] Put braces around MOVE_RATIO aarch64 macro Date: Mon, 11 Sep 2023 17:25:24 +0000 (GMT) [thread overview] Message-ID: <20230911172524.863D33858407@sourceware.org> (raw) https://gcc.gnu.org/g:c74351eb79ab309a10c6d61ac5fe800e0cb479c3 commit c74351eb79ab309a10c6d61ac5fe800e0cb479c3 Author: Matthew Malcomson <matthew.malcomson@arm.com> Date: Mon Sep 11 16:17:45 2023 +0100 Put braces around MOVE_RATIO aarch64 macro We had earlier made our MOVE_RATIO macro return zero for MORELLO targets. This is so we can disable the move-by-pieces infrastructure on memory which could contain capabilities. Block moving of data which could contain capabilities needs to avoid invalidating said capabilities, and we have not adjusted this infrastructure to do so. The macro we had was not parenthesised. While adding some loop optimisations to the compiler with capabilities I noticed that the testcase new17.C was failing. It turns out that this was because this MOVE_RATIO macro was interacting with surrounding code in `estimate_num_insns` in an unintended manner. With added braces around the macro the test now passes for capabilities. Diff: --- gcc/config/aarch64/aarch64.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 635f1cc0eca9..cb68286036c6 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -1126,8 +1126,8 @@ typedef struct targeting -mstrict-align, so keep a sensible default in that case. Disable this for ccapability-enabled architectures to avoid invalidating a capability due to a move_by_pieces operation. */ -#define MOVE_RATIO(speed) TARGET_MORELLO ? 0 : \ - (!STRICT_ALIGNMENT ? 2 : (((speed) ? 15 : AARCH64_CALL_RATIO) / 2)) +#define MOVE_RATIO(speed) (TARGET_MORELLO ? 0 : \ + (!STRICT_ALIGNMENT ? 2 : (((speed) ? 15 : AARCH64_CALL_RATIO) / 2))) /* For CLEAR_RATIO, when optimizing for size, give a better estimate of the length of a memset call, but use the default otherwise. */
reply other threads:[~2023-09-11 17:25 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230911172524.863D33858407@sourceware.org \ --to=matmal01@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).