From: Richard Sandiford <richard.sandiford@arm.com>
To: gcc-patches@gcc.gnu.org
Cc: Richard Sandiford <richard.sandiford@arm.com>
Subject: [PATCH 8/8] aarch64: Add some uses of force_highpart_subreg
Date: Mon, 17 Jun 2024 10:53:36 +0100 [thread overview]
Message-ID: <20240617095336.871176-9-richard.sandiford@arm.com> (raw)
In-Reply-To: <20240617095336.871176-1-richard.sandiford@arm.com>
This patch adds uses of force_highpart_subreg to places that
already use force_lowpart_subreg.
gcc/
* config/aarch64/aarch64.cc (aarch64_addti_scratch_regs): Use
force_highpart_subreg instead of gen_highpart and simplify_gen_subreg.
(aarch64_subvti_scratch_regs): Likewise.
---
gcc/config/aarch64/aarch64.cc | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index c952a7cdefe..026f8627a89 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -26873,19 +26873,12 @@ aarch64_addti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
*low_in1 = force_lowpart_subreg (DImode, op1, TImode);
*low_in2 = force_lowpart_subreg (DImode, op2, TImode);
*high_dest = gen_reg_rtx (DImode);
- *high_in1 = gen_highpart (DImode, op1);
- *high_in2 = simplify_gen_subreg (DImode, op2, TImode,
- subreg_highpart_offset (DImode, TImode));
+ *high_in1 = force_highpart_subreg (DImode, op1, TImode);
+ *high_in2 = force_highpart_subreg (DImode, op2, TImode);
}
/* Generate DImode scratch registers for 128-bit (TImode) subtraction.
- This function differs from 'arch64_addti_scratch_regs' in that
- OP1 can be an immediate constant (zero). We must call
- subreg_highpart_offset with DImode and TImode arguments, otherwise
- VOIDmode will be used for the const_int which generates an internal
- error from subreg_size_highpart_offset which does not expect a size of zero.
-
OP1 represents the TImode destination operand 1
OP2 represents the TImode destination operand 2
LOW_DEST represents the low half (DImode) of TImode operand 0
@@ -26907,10 +26900,8 @@ aarch64_subvti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
*low_in2 = force_lowpart_subreg (DImode, op2, TImode);
*high_dest = gen_reg_rtx (DImode);
- *high_in1 = simplify_gen_subreg (DImode, op1, TImode,
- subreg_highpart_offset (DImode, TImode));
- *high_in2 = simplify_gen_subreg (DImode, op2, TImode,
- subreg_highpart_offset (DImode, TImode));
+ *high_in1 = force_highpart_subreg (DImode, op1, TImode);
+ *high_in2 = force_highpart_subreg (DImode, op2, TImode);
}
/* Generate RTL for 128-bit (TImode) subtraction with overflow.
--
2.25.1
next prev parent reply other threads:[~2024-06-17 9:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 9:53 [PATCH 0/8] Follow-on force_subreg patches Richard Sandiford
2024-06-17 9:53 ` [PATCH 1/8] Make force_subreg emit nothing on failure Richard Sandiford
2024-06-17 9:53 ` [PATCH 2/8] aarch64: Use force_subreg in more places Richard Sandiford
2024-06-17 9:53 ` [PATCH 3/8] Make more use of force_subreg Richard Sandiford
2024-06-21 20:10 ` Jeff Law
2024-06-22 1:30 ` Andrew Pinski
2024-06-25 8:42 ` Richard Sandiford
2024-06-17 9:53 ` [PATCH 4/8] Add force_lowpart_subreg Richard Sandiford
2024-06-17 9:53 ` [PATCH 5/8] aarch64: Add some uses of force_lowpart_subreg Richard Sandiford
2024-06-17 9:53 ` [PATCH 6/8] Make more use " Richard Sandiford
2024-06-17 9:53 ` [PATCH 7/8] Add force_highpart_subreg Richard Sandiford
2024-06-17 9:53 ` Richard Sandiford [this message]
2024-06-18 11:10 ` [PATCH 0/8] Follow-on force_subreg patches Richard Biener
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=20240617095336.871176-9-richard.sandiford@arm.com \
--to=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).