public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Avoid unnecessary slideup in compress pattern of vec_perm
@ 2023-09-11 13:39 Jeff Law
0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2023-09-11 13:39 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d304e16df2cfaf71a63148ba397f6a60e96b5718
commit d304e16df2cfaf71a63148ba397f6a60e96b5718
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date: Sun Sep 10 22:07:10 2023 +0800
RISC-V: Avoid unnecessary slideup in compress pattern of vec_perm
gcc/ChangeLog:
* config/riscv/riscv-v.cc (shuffle_compress_patterns): Avoid unnecessary slideup.
(cherry picked from commit e390872aebcfebb7c9bc95d8fb7e44f2bec996d3)
Diff:
---
gcc/config/riscv/riscv-v.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc
index 1ca3f1dc8df5..8a548f5d1a27 100644
--- a/gcc/config/riscv/riscv-v.cc
+++ b/gcc/config/riscv/riscv-v.cc
@@ -2647,7 +2647,8 @@ shuffle_compress_patterns (struct expand_vec_perm_d *d)
For index = { 0, 2, 5, 6}, we need to slide op1 up before
we apply compress approach. */
- bool need_slideup_p = maybe_ne (d->perm[vlen - 1], 2 * vec_len - 1);
+ bool need_slideup_p = maybe_ne (d->perm[vlen - 1], 2 * vec_len - 1)
+ && !const_vec_duplicate_p (d->op1);
/* If we leave it directly be handled by general gather,
the code sequence will be:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-11 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 13:39 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Avoid unnecessary slideup in compress pattern of vec_perm Jeff Law
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).