diff options
author | Ju-Zhe Zhong <juzhe.zhong@rivai.ai> | 2023-06-23 07:51:12 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2023-06-24 08:49:29 +0800 |
commit | d39f4889cc24c5c96cf9112045298e0945b9932c (patch) | |
tree | e44b171bcff238830b8e3344e87b61c6ed20a67f /gcc/optabs-tree.h | |
parent | 6f78df4cdbfca94a0d36d339c14b9d81315d8339 (diff) | |
download | gcc-d39f4889cc24c5c96cf9112045298e0945b9932c.zip gcc-d39f4889cc24c5c96cf9112045298e0945b9932c.tar.gz gcc-d39f4889cc24c5c96cf9112045298e0945b9932c.tar.bz2 |
VECT: Apply LEN_MASK_{LOAD,STORE} into vectorizer
Address comments from Richard and Bernhard from V5 patch.
V6 fixed all issues according their comments.
gcc/ChangeLog:
* internal-fn.cc (expand_partial_store_optab_fn): Adapt for LEN_MASK_STORE.
(internal_load_fn_p): Add LEN_MASK_LOAD.
(internal_store_fn_p): Add LEN_MASK_STORE.
(internal_fn_mask_index): Add LEN_MASK_{LOAD,STORE}.
(internal_fn_stored_value_index): Add LEN_MASK_STORE.
(internal_len_load_store_bias): Add LEN_MASK_{LOAD,STORE}.
* optabs-tree.cc (can_vec_mask_load_store_p): Adapt for LEN_MASK_{LOAD,STORE}.
(get_len_load_store_mode): Ditto.
* optabs-tree.h (can_vec_mask_load_store_p): Ditto.
(get_len_load_store_mode): Ditto.
* tree-vect-stmts.cc (check_load_store_for_partial_vectors): Ditto.
(get_all_ones_mask): New function.
(vectorizable_store): Apply LEN_MASK_{LOAD,STORE} into vectorizer.
(vectorizable_load): Ditto.
Diffstat (limited to 'gcc/optabs-tree.h')
-rw-r--r-- | gcc/optabs-tree.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/optabs-tree.h b/gcc/optabs-tree.h index a3f79b6..e421fc2 100644 --- a/gcc/optabs-tree.h +++ b/gcc/optabs-tree.h @@ -47,7 +47,9 @@ bool expand_vec_cond_expr_p (tree, tree, enum tree_code); void init_tree_optimization_optabs (tree); bool target_supports_op_p (tree, enum tree_code, enum optab_subtype = optab_default); -bool can_vec_mask_load_store_p (machine_mode, machine_mode, bool); -opt_machine_mode get_len_load_store_mode (machine_mode, bool); +bool can_vec_mask_load_store_p (machine_mode, machine_mode, bool, + internal_fn * = nullptr); +opt_machine_mode get_len_load_store_mode (machine_mode, bool, + internal_fn * = nullptr); #endif |