public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2703] cleanup: Change condition order
@ 2023-07-21 8:35 Lehua Ding
0 siblings, 0 replies; only message in thread
From: Lehua Ding @ 2023-07-21 8:35 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:3e76bdd5fd289ac38326060bba91b0e264c50ccf
commit r14-2703-g3e76bdd5fd289ac38326060bba91b0e264c50ccf
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date: Fri Jul 21 10:23:43 2023 +0800
cleanup: Change condition order
Hi, Richard and Richi.
I have double check the recent codes for len && mask support again.
Some places code structure:
if (len_mask_fn)
...
else if (mask_fn)
...
some places code structure:
if (mask_len_fn)
...
else if (mask)
Base on previous review comment from Richi:
https://gcc.gnu.org/pipermail/gcc-patches/2023-July/625067.html
len mask stuff should be checked before mask.
So I reorder all condition order to check LEN MASK stuff before MASK.
This is the last clean up patch.
Boostrap and Regression is on the way.
gcc/ChangeLog:
* tree-vect-stmts.cc (check_load_store_for_partial_vectors): Change condition order.
(vectorizable_operation): Ditto.
Diff:
---
gcc/tree-vect-stmts.cc | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index 2555958ab8f..ed28fbdced3 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -1635,17 +1635,17 @@ check_load_store_for_partial_vectors (loop_vec_info loop_vinfo, tree vectype,
internal_fn len_ifn = (is_load
? IFN_MASK_LEN_GATHER_LOAD
: IFN_MASK_LEN_SCATTER_STORE);
- if (internal_gather_scatter_fn_supported_p (ifn, vectype,
+ if (internal_gather_scatter_fn_supported_p (len_ifn, vectype,
gs_info->memory_type,
gs_info->offset_vectype,
gs_info->scale))
- vect_record_loop_mask (loop_vinfo, masks, nvectors, vectype,
- scalar_mask);
- else if (internal_gather_scatter_fn_supported_p (len_ifn, vectype,
+ vect_record_loop_len (loop_vinfo, lens, nvectors, vectype, 1);
+ else if (internal_gather_scatter_fn_supported_p (ifn, vectype,
gs_info->memory_type,
gs_info->offset_vectype,
gs_info->scale))
- vect_record_loop_len (loop_vinfo, lens, nvectors, vectype, 1);
+ vect_record_loop_mask (loop_vinfo, masks, nvectors, vectype,
+ scalar_mask);
else
{
if (dump_enabled_p ())
@@ -6598,16 +6598,16 @@ vectorizable_operation (vec_info *vinfo,
&& LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo)
&& mask_out_inactive)
{
- if (cond_fn != IFN_LAST
- && direct_internal_fn_supported_p (cond_fn, vectype,
+ if (cond_len_fn != IFN_LAST
+ && direct_internal_fn_supported_p (cond_len_fn, vectype,
OPTIMIZE_FOR_SPEED))
- vect_record_loop_mask (loop_vinfo, masks, ncopies * vec_num,
- vectype, NULL);
- else if (cond_len_fn != IFN_LAST
- && direct_internal_fn_supported_p (cond_len_fn, vectype,
- OPTIMIZE_FOR_SPEED))
vect_record_loop_len (loop_vinfo, lens, ncopies * vec_num, vectype,
1);
+ else if (cond_fn != IFN_LAST
+ && direct_internal_fn_supported_p (cond_fn, vectype,
+ OPTIMIZE_FOR_SPEED))
+ vect_record_loop_mask (loop_vinfo, masks, ncopies * vec_num,
+ vectype, NULL);
else
{
if (dump_enabled_p ())
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-21 8:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-21 8:35 [gcc r14-2703] cleanup: Change condition order Lehua Ding
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).