From: Xi Ruoyao <xry111@xry111.site>
To: gcc-patches@gcc.gnu.org
Cc: chenglulu <chenglulu@loongson.cn>, i@xen0n.name, xuchenghua@loongson.cn
Subject: Pushed: [PATCH v3 0/5] LoongArch: SIMD fixes and optimizations
Date: Wed, 29 Nov 2023 15:12:36 +0800 [thread overview]
Message-ID: <a758461ffac77f3b18ac5e429418d521270bb648.camel@xry111.site> (raw)
In-Reply-To: <20231120004728.205167-1-xry111@xry111.site>
On Mon, 2023-11-20 at 08:47 +0800, Xi Ruoyao wrote:
> The [1/5] patch is the PR112578 fix at
> https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637097.html.
> It has been changed to remove the nearbyint pattern (because nearbyint
> should not raise FE_INEXACT even if -ffp-int-builtin-inexact).
> As other patches depending on the simd.md file introduced by this, sending
> it as the first of this series.
>
> As many LASX instructions are only differentiated from the corresponding
> LSX instruction with operand length, create simd.md file to contain the
> RTX templates sharable by LSX and LASX. This makes the code cleaner and
> easier to maintain.
>
> The [2/5] and [3/5] patches make vector product highpart and rotate
> shift operations for GNU vectors and auto vectorization.
>
> The [4/5] patch is a simple code cleanup, with no function change.
>
> The [5/5] patch uses LSX for FP scalar rounding operations if LSX is
> available and -ffp-int-builtin-exact. We do this because the base FP
> ISA does not have such instructions. Using LSX is overkill, but still
> much faster than calling libc functions.
>
> Bootstrapped and regtested on loongarch64-linux-gnu. Ok for trunk?
Pushed r14-5950 .. r14-5954 with minor change: a FSF copyright
disclaimer is added into simd.md in the 1st patch, and an used
match_scratch is removed from <simd_frint_pattern><mode>2 in the 5th
patch.
> Xi Ruoyao (5):
> LoongArch: Fix usage of LSX and LASX frint/ftint instructions
> [PR112578]
> LoongArch: Use standard pattern name and RTX code for LSX/LASX muh
> instructions
> LoongArch: Use standard pattern name and RTX code for LSX/LASX rotate
> shift
> LoongArch: Remove lrint_allow_inexact
> LoongArch: Use LSX for scalar FP rounding with explicit rounding mode
>
> gcc/config/loongarch/lasx.md | 283 -----------------
> gcc/config/loongarch/loongarch-builtins.cc | 52 ++--
> gcc/config/loongarch/loongarch.md | 12 +-
> gcc/config/loongarch/lsx.md | 293 ------------------
> gcc/config/loongarch/simd.md | 268 ++++++++++++++++
> .../loongarch/vect-frint-no-inexact.c | 48 +++
> .../loongarch/vect-frint-scalar-no-inexact.c | 23 ++
> .../gcc.target/loongarch/vect-frint-scalar.c | 43 +++
> .../gcc.target/loongarch/vect-frint.c | 85 +++++
> .../loongarch/vect-ftint-no-inexact.c | 44 +++
> .../gcc.target/loongarch/vect-ftint.c | 83 +++++
> gcc/testsuite/gcc.target/loongarch/vect-muh.c | 36 +++
> .../gcc.target/loongarch/vect-rotr.c | 36 +++
> 13 files changed, 701 insertions(+), 605 deletions(-)
> create mode 100644 gcc/config/loongarch/simd.md
> create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-frint-no-inexact.c
> create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-frint-scalar-no-inexact.c
> create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-frint-scalar.c
> create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-frint.c
> create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-ftint-no-inexact.c
> create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-ftint.c
> create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-muh.c
> create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-rotr.c
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2023-11-29 7:12 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 0:47 Xi Ruoyao
2023-11-20 0:47 ` [PATCH v3 1/5] LoongArch: Fix usage of LSX and LASX frint/ftint instructions [PR112578] Xi Ruoyao
2023-11-23 6:35 ` chenglulu
2023-11-23 7:11 ` Xi Ruoyao
2023-11-23 7:31 ` chenglulu
2023-11-23 8:13 ` chenglulu
2023-11-23 9:02 ` Xi Ruoyao
2023-11-23 9:12 ` chenglulu
2023-11-23 10:12 ` Xi Ruoyao
2023-11-23 12:06 ` Xi Ruoyao
2023-11-23 18:03 ` Joseph Myers
2023-11-24 2:39 ` Xi Ruoyao
2023-11-24 8:01 ` chenglulu
2023-11-24 8:26 ` Xi Ruoyao
2023-11-24 8:36 ` chenglulu
2023-11-24 8:42 ` Xi Ruoyao
2023-11-24 9:46 ` chenglulu
2023-11-24 10:30 ` Xi Ruoyao
2023-11-24 14:59 ` chenglulu
2023-11-23 8:54 ` Xi Ruoyao
2023-11-20 0:47 ` [PATCH v3 2/5] LoongArch: Use standard pattern name and RTX code for LSX/LASX muh instructions Xi Ruoyao
2023-11-23 12:08 ` chenglulu
2023-11-20 0:47 ` [PATCH v3 3/5] LoongArch: Use standard pattern name and RTX code for LSX/LASX rotate shift Xi Ruoyao
2023-11-23 8:42 ` chenglulu
2023-11-20 0:47 ` [PATCH v3 4/5] LoongArch: Remove lrint_allow_inexact Xi Ruoyao
2023-11-23 8:23 ` chenglulu
2023-11-23 8:58 ` Xi Ruoyao
2023-11-23 9:14 ` chenglulu
2023-11-23 12:24 ` Xi Ruoyao
2023-11-23 14:39 ` chenglulu
2023-11-20 0:47 ` [PATCH v3 5/5] LoongArch: Use LSX for scalar FP rounding with explicit rounding mode Xi Ruoyao
2023-11-29 7:12 ` Xi Ruoyao [this message]
2023-11-29 7:45 ` Pushed: [PATCH v3 0/5] LoongArch: SIMD fixes and optimizations chenglulu
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=a758461ffac77f3b18ac5e429418d521270bb648.camel@xry111.site \
--to=xry111@xry111.site \
--cc=chenglulu@loongson.cn \
--cc=gcc-patches@gcc.gnu.org \
--cc=i@xen0n.name \
--cc=xuchenghua@loongson.cn \
/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).