aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.h
diff options
context:
space:
mode:
authorXionghu Luo <luoxhu@linux.ibm.com>2020-09-27 00:27:32 -0500
committerXionghu Luo <luoxhu@linux.ibm.com>2020-09-27 00:27:32 -0500
commit683e55facfd5c1d348796119424d7b3f9e889ffe (patch)
tree182e5ca06d98352268ad98a44f900859843331ec /gcc/optabs.h
parent91dd4a3864110704c921ab8467f568ff42c38e5c (diff)
downloadgcc-683e55facfd5c1d348796119424d7b3f9e889ffe.zip
gcc-683e55facfd5c1d348796119424d7b3f9e889ffe.tar.gz
gcc-683e55facfd5c1d348796119424d7b3f9e889ffe.tar.bz2
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.
Diffstat (limited to 'gcc/optabs.h')
-rw-r--r--gcc/optabs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/optabs.h b/gcc/optabs.h
index 7c2ec25..0b14700 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -249,6 +249,10 @@ extern int can_compare_p (enum rtx_code, machine_mode,
VALUE_MODE. */
extern bool can_vcond_compare_p (enum rtx_code, machine_mode, machine_mode);
+/* Return whether the backend can emit vector set instructions for inserting
+ element into vector at variable index position. */
+extern bool can_vec_set_var_idx_p (machine_mode);
+
extern rtx prepare_operand (enum insn_code, rtx, int, machine_mode,
machine_mode, int);
/* Emit a pair of rtl insns to compare two rtx's and to jump