From: Jonathan Wright <Jonathan.Wright@arm.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: Richard Sandiford <Richard.Sandiford@arm.com>,
Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
Subject: [PATCH 5/6] gcc/lower_subreg.c: Prevent decomposition if modes are not tieable
Date: Fri, 22 Oct 2021 14:37:26 +0000 [thread overview]
Message-ID: <DB9PR08MB6959A31881C9CEFE4B137348EB809@DB9PR08MB6959.eurprd08.prod.outlook.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 649 bytes --]
Hi,
Preventing decomposition if modes are not tieable is necessary to
stop AArch64 partial Neon structure modes being treated as packed in
registers.
This is a necessary prerequisite for a future AArch64 PCS change to
maintain good code generation.
Bootstrapped and regression tested on:
* x86_64-pc-linux-gnu - no issues.
* aarch64-none-linux-gnu - two test failures which will be fixed by
the next patch in this series.
Ok for master?
Thanks,
Jonathan
---
gcc/ChangeLog:
2021-10-14 Jonathan Wright <jonathan.wright@arm.com>
* lower-subreg.c (simple_move): Prevent decomposition if
modes are not tieable.
[-- Attachment #2: rb14936.patch --]
[-- Type: application/octet-stream, Size: 740 bytes --]
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
index 21078268ba0d241efc469fe71357d3b94f8935d6..f0dc63f485f1237d96ceeb0c75dca9aa8e053c6e 100644
--- a/gcc/lower-subreg.c
+++ b/gcc/lower-subreg.c
@@ -383,8 +383,10 @@ simple_move (rtx_insn *insn, bool speed_p)
non-integer mode for which there is no integer mode of the same
size. */
mode = GET_MODE (SET_DEST (set));
+ scalar_int_mode int_mode;
if (!SCALAR_INT_MODE_P (mode)
- && !int_mode_for_size (GET_MODE_BITSIZE (mode), 0).exists ())
+ && (!int_mode_for_size (GET_MODE_BITSIZE (mode), 0).exists (&int_mode)
+ || !targetm.modes_tieable_p (mode, int_mode)))
return NULL_RTX;
/* Reject PARTIAL_INT modes. They are used for processor specific
next reply other threads:[~2021-10-22 14:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-22 14:37 Jonathan Wright [this message]
2021-10-22 15:14 ` Richard Sandiford
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=DB9PR08MB6959A31881C9CEFE4B137348EB809@DB9PR08MB6959.eurprd08.prod.outlook.com \
--to=jonathan.wright@arm.com \
--cc=Kyrylo.Tkachov@arm.com \
--cc=Richard.Sandiford@arm.com \
--cc=gcc-patches@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: link
Be 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).