From: Jeff Law <jeffreyalaw@gmail.com>
To: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] simplify-rtx: Implement constant folding of SS_TRUNCATE, US_TRUNCATE
Date: Fri, 9 Jun 2023 09:11:02 -0600 [thread overview]
Message-ID: <f6747607-1f4e-76e2-3cc8-94f14cec0874@gmail.com> (raw)
In-Reply-To: <PAXPR08MB6926C9C547D641065D6AF5379350A@PAXPR08MB6926.eurprd08.prod.outlook.com>
On 6/8/23 08:56, Kyrylo Tkachov via Gcc-patches wrote:
> Hi all,
>
> This patch implements RTL constant-folding for the SS_TRUNCATE and US_TRUNCATE codes.
> The semantics are a clamping operation on the argument with the min and max of the narrow mode,
> followed by a truncation. The signedness of the clamp and the min/max extrema is derived from
> the signedness of the saturating operation.
>
> We have a number of instructions in aarch64 that use SS_TRUNCATE and US_TRUNCATE to represent
> their operations and we have pretty thorough runtime tests in gcc.target/aarch64/advsimd-intrinsics/vqmovn*.c.
> With this patch the instructions are folded away at optimisation levels and the correctness checks still
> pass.
>
> Bootstrapped and tested on aarch64-none-linux-gnu and aarch64_be-none-elf.
> Ok for trunk?
>
> Thanks,
> Kyrill
>
> gcc/ChangeLog:
>
> * simplify-rtx.cc (simplify_const_unary_operation):
> Handle US_TRUNCATE, SS_TRUNCATE.
OK.
jeff
next prev parent reply other threads:[~2023-06-09 15:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 14:56 Kyrylo Tkachov
2023-06-09 15:11 ` Jeff Law [this message]
2023-06-09 18:08 ` Richard Sandiford
2023-06-12 10:45 ` Kyrylo Tkachov
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=f6747607-1f4e-76e2-3cc8-94f14cec0874@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=Kyrylo.Tkachov@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).