diff options
author | Juzhe-Zhong <juzhe.zhong@rivai.ai> | 2023-07-21 10:09:00 +0800 |
---|---|---|
committer | Lehua Ding <lehua.ding@rivai.ai> | 2023-07-21 16:34:45 +0800 |
commit | 363bb3dca429e885ce3d134fc50f8ab05aacda0f (patch) | |
tree | 69fbfa924da847e17b53b31bbabafcd0981c53c6 /gcc/cfgloop.cc | |
parent | bd68b33f80ae4726393dbd6e12025f99dc269c12 (diff) | |
download | gcc-363bb3dca429e885ce3d134fc50f8ab05aacda0f.zip gcc-363bb3dca429e885ce3d134fc50f8ab05aacda0f.tar.gz gcc-363bb3dca429e885ce3d134fc50f8ab05aacda0f.tar.bz2 |
cleanup: make all cond_len_* and mask_len_* consistent on the order of mask and len
This patch is depending on:
https://gcc.gnu.org/pipermail/gcc-patches/2023-July/625121.html
Hi, Richard and Richi.
This patch is to align the order of mask and len.
Currently, According to this piece code:
if (final_len && final_mask)
call = gimple_build_call_internal (
IFN_LEN_MASK_GATHER_LOAD, 7, dataref_ptr,
vec_offset, scale, zero, final_mask, final_len,
bias);
You can see the order of mask and len, is {mask,len,bias}.
"mask" comes before "len". The reason of this order is that we want to
reuse the current codes of MASK_GATHER_LOAD/MASK_SCATTER_STORE.
Same situation for COND_LEN_*, we want to reuse the codes of COND_*.
Reusing codes from the existing MASK_* or COND_* can allow us not to
change the codes too much and make the codes elegant and easy to maintain && read.
To avoid any confusions of auto-vectorization patterns that includes both mask and len,
this patch align the order of mask and len for both Gimple IR and RTL pattern into
{mask, len, bias} to make everything cleaner and more elegant.
Bootstrap and Regression is on the way.
gcc/ChangeLog:
* config/riscv/autovec.md: Align order of mask and len.
* config/riscv/riscv-v.cc (expand_load_store): Ditto.
(expand_gather_scatter): Ditto.
* doc/md.texi: Ditto.
* internal-fn.cc (add_len_and_mask_args): Ditto.
(add_mask_and_len_args): Ditto.
(expand_partial_load_optab_fn): Ditto.
(expand_partial_store_optab_fn): Ditto.
(expand_scatter_store_optab_fn): Ditto.
(expand_gather_load_optab_fn): Ditto.
(internal_fn_len_index): Ditto.
(internal_fn_mask_index): Ditto.
(internal_len_load_store_bias): Ditto.
* tree-vect-stmts.cc (vectorizable_store): Ditto.
(vectorizable_load): Ditto.
Diffstat (limited to 'gcc/cfgloop.cc')
0 files changed, 0 insertions, 0 deletions