public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Add comments of some functions
@ 2023-06-19 11:41 Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-06-19 11:41 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:38e32f9d67ed0d1ee9e20f6ce81f55ef3a4d8370
commit 38e32f9d67ed0d1ee9e20f6ce81f55ef3a4d8370
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date: Tue Jun 13 10:26:11 2023 +0800
RISC-V: Add comments of some functions
gcc/ChangeLog:
* config/riscv/riscv-v.cc (rvv_builder::single_step_npatterns_p): Add comment.
(shuffle_generic_patterns): Ditto.
(expand_vec_perm_const_1): Ditto.
Diff:
---
gcc/config/riscv/riscv-v.cc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc
index 34fdb53c140..d797326d736 100644
--- a/gcc/config/riscv/riscv-v.cc
+++ b/gcc/config/riscv/riscv-v.cc
@@ -457,6 +457,9 @@ rvv_builder::single_step_npatterns_p () const
{ 2, 2, 2, 2, 4, 4, 4, 4, 8, 8, 8, 8, 16, 16, 16, 16, ... }
E.g. NPATTERNS = 8:
{ 2, 2, 2, 2, 2, 2, 2, 2, 8, 8, 8, 8, 8, 8, 8, 8, ... }
+ We only check ele[0] ~ ele[NPATTERNS - 1] whether they are the same.
+ We don't need to check the elements[n] with n >= NPATTERNS since
+ they don't belong to the same pattern.
*/
bool
rvv_builder::npatterns_all_equal_p () const
@@ -2478,6 +2481,8 @@ shuffle_generic_patterns (struct expand_vec_perm_d *d)
return true;
}
+/* This function recognizes and supports different permutation patterns
+ and enable VLA SLP auto-vectorization. */
static bool
expand_vec_perm_const_1 (struct expand_vec_perm_d *d)
{
@@ -2509,6 +2514,8 @@ expand_vec_perm_const_1 (struct expand_vec_perm_d *d)
return false;
}
+/* This function implements TARGET_VECTORIZE_VEC_PERM_CONST by using RVV
+ * instructions. */
bool
expand_vec_perm_const (machine_mode vmode, machine_mode op_mode, rtx target,
rtx op0, rtx op1, const vec_perm_indices &sel)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Add comments of some functions
@ 2023-07-14 2:45 Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-07-14 2:45 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d3dde8969dfdd4c3250251a12e9c0ee9f0f103c8
commit d3dde8969dfdd4c3250251a12e9c0ee9f0f103c8
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date: Tue Jun 13 10:26:11 2023 +0800
RISC-V: Add comments of some functions
gcc/ChangeLog:
* config/riscv/riscv-v.cc (rvv_builder::single_step_npatterns_p): Add comment.
(shuffle_generic_patterns): Ditto.
(expand_vec_perm_const_1): Ditto.
Diff:
---
gcc/config/riscv/riscv-v.cc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc
index 34fdb53c140..d797326d736 100644
--- a/gcc/config/riscv/riscv-v.cc
+++ b/gcc/config/riscv/riscv-v.cc
@@ -457,6 +457,9 @@ rvv_builder::single_step_npatterns_p () const
{ 2, 2, 2, 2, 4, 4, 4, 4, 8, 8, 8, 8, 16, 16, 16, 16, ... }
E.g. NPATTERNS = 8:
{ 2, 2, 2, 2, 2, 2, 2, 2, 8, 8, 8, 8, 8, 8, 8, 8, ... }
+ We only check ele[0] ~ ele[NPATTERNS - 1] whether they are the same.
+ We don't need to check the elements[n] with n >= NPATTERNS since
+ they don't belong to the same pattern.
*/
bool
rvv_builder::npatterns_all_equal_p () const
@@ -2478,6 +2481,8 @@ shuffle_generic_patterns (struct expand_vec_perm_d *d)
return true;
}
+/* This function recognizes and supports different permutation patterns
+ and enable VLA SLP auto-vectorization. */
static bool
expand_vec_perm_const_1 (struct expand_vec_perm_d *d)
{
@@ -2509,6 +2514,8 @@ expand_vec_perm_const_1 (struct expand_vec_perm_d *d)
return false;
}
+/* This function implements TARGET_VECTORIZE_VEC_PERM_CONST by using RVV
+ * instructions. */
bool
expand_vec_perm_const (machine_mode vmode, machine_mode op_mode, rtx target,
rtx op0, rtx op1, const vec_perm_indices &sel)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-14 2:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-19 11:41 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Add comments of some functions Jeff Law
2023-07-14 2:45 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).