IFN: Implement IFN_VEC_SET for ARRAY_REF with VIEW_CONVERT_EXPR
authorXionghu Luo <luoxhu@linux.ibm.com>
Sun, 27 Sep 2020 05:27:32 +0000 (00:27 -0500)
committerXionghu Luo <luoxhu@linux.ibm.com>
Sun, 27 Sep 2020 05:27:32 +0000 (00:27 -0500)
commit683e55facfd5c1d348796119424d7b3f9e889ffe
tree182e5ca06d98352268ad98a44f900859843331ec
parent91dd4a3864110704c921ab8467f568ff42c38e5c
IFN: Implement IFN_VEC_SET for ARRAY_REF with VIEW_CONVERT_EXPR

This patch enables transformation from ARRAY_REF(VIEW_CONVERT_EXPR) to
VEC_SET internal function in gimple-isel pass if target supports
vec_set with variable index by checking can_vec_set_var_idx_p.

gcc/ChangeLog:

2020-09-27  Xionghu Luo  <luoxhu@linux.ibm.com>

* gimple-isel.cc (gimple_expand_vec_set_expr): New function.
(gimple_expand_vec_cond_exprs): Rename to ...
(gimple_expand_vec_exprs): ... this and call
gimple_expand_vec_set_expr.
* internal-fn.c (vec_set_direct): New define.
(expand_vec_set_optab_fn): New function.
(direct_vec_set_optab_supported_p): New define.
* internal-fn.def (VEC_SET): New DEF_INTERNAL_OPTAB_FN.
* optabs.c (can_vec_set_var_idx_p): New function.
* optabs.h (can_vec_set_var_idx_p): New declaration.
gcc/gimple-isel.cc
gcc/internal-fn.c
gcc/internal-fn.def
gcc/optabs.c
gcc/optabs.h