From: Jiahao Xu <xujiahao@loongson.cn>
To: gcc-patches@gcc.gnu.org
Cc: xry111@xry111.site, i@xen0n.name, chenglulu@loongson.cn,
xuchenghua@loongson.cn, Jiahao Xu <xujiahao@loongson.cn>
Subject: [PATCH 0/3] Optimize loongarch vector implementation.
Date: Mon, 16 Oct 2023 10:00:11 +0800 [thread overview]
Message-ID: <20231016020014.41979-1-xujiahao@loongson.cn> (raw)
The following three patches further enhance loongarch’s vectorization capabilities.
Patch one add LoongArch support for AVG_CEIL/FLOOR.
Patch 2 add LoongArch support for vec_widen_mult/add/sub_lo/hi patterns.
patch 3 make loongarch use the new vector hooks and implements the costing
function determine_suggested_unroll_factor, to make it be able to suggest the
unroll factor for a given loop being vectorized base vec_ops analysis during
vector costing and the available issue information.The patch also adjusts cost
model through performance analysis.
Jiahao Xu (3):
LoongArch:Implement avg and sad standard names.
LoongArch:Implement vec_widen standard names.
LoongArch:Implement the new vector cost model framework.
gcc/config/loongarch/genopts/loongarch.opt.in | 15 +-
gcc/config/loongarch/lasx.md | 156 ++++++++-
gcc/config/loongarch/loongarch-protos.h | 1 +
gcc/config/loongarch/loongarch.cc | 309 +++++++++++++++++-
gcc/config/loongarch/loongarch.md | 2 +
gcc/config/loongarch/loongarch.opt | 15 +-
gcc/config/loongarch/lsx.md | 74 +++++
gcc/doc/invoke.texi | 7 +
.../gcc.target/loongarch/avg-ceil-lasx.c | 22 ++
.../gcc.target/loongarch/avg-ceil-lsx.c | 22 ++
.../gcc.target/loongarch/avg-floor-lasx.c | 22 ++
.../gcc.target/loongarch/avg-floor-lsx.c | 22 ++
gcc/testsuite/gcc.target/loongarch/sad-lasx.c | 20 ++
gcc/testsuite/gcc.target/loongarch/sad-lsx.c | 20 ++
.../gcc.target/loongarch/vect-widen-add.c | 26 ++
.../gcc.target/loongarch/vect-widen-mul.c | 26 ++
.../gcc.target/loongarch/vect-widen-sub.c | 26 ++
17 files changed, 746 insertions(+), 39 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/loongarch/avg-ceil-lasx.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/avg-ceil-lsx.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/avg-floor-lasx.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/avg-floor-lsx.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/sad-lasx.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/sad-lsx.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-widen-add.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-widen-mul.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-widen-sub.c
--
2.20.1
next reply other threads:[~2023-10-16 2:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 2:00 Jiahao Xu [this message]
2023-10-16 2:00 ` [PATCH 1/3] LoongArch:Implement avg and sad standard names Jiahao Xu
2023-10-16 2:00 ` [PATCH 2/3] LoongArch:Implement vec_widen " Jiahao Xu
2023-10-16 2:00 ` [PATCH 3/3] LoongArch:Implement the new vector cost model framework Jiahao Xu
2023-10-19 6:16 ` Re:[pushed] [PATCH 0/3] Optimize loongarch vector implementation 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=20231016020014.41979-1-xujiahao@loongson.cn \
--to=xujiahao@loongson.cn \
--cc=chenglulu@loongson.cn \
--cc=gcc-patches@gcc.gnu.org \
--cc=i@xen0n.name \
--cc=xry111@xry111.site \
--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).