diff options
author | Robin Dapp <rdapp@ventanamicro.com> | 2023-06-28 15:48:55 +0200 |
---|---|---|
committer | Robin Dapp <rdapp@ventanamicro.com> | 2023-07-05 16:57:05 +0200 |
commit | c30efd8cd634f8a59bc1bf52e71d8866bf52d56c (patch) | |
tree | 626cf8ee88df61e6b4ee4106d725e0e716799ff2 /libgcc | |
parent | 573bb719bb82d1d61ca54eb4fddf82eccfd56470 (diff) | |
download | gcc-c30efd8cd634f8a59bc1bf52e71d8866bf52d56c.zip gcc-c30efd8cd634f8a59bc1bf52e71d8866bf52d56c.tar.gz gcc-c30efd8cd634f8a59bc1bf52e71d8866bf52d56c.tar.bz2 |
gimple-isel: Recognize vec_extract pattern.
In gimple-isel we already deduce a vec_set pattern from an
ARRAY_REF(VIEW_CONVERT_EXPR). This patch does the same for a
vec_extract.
The code is largely similar to the vec_set one
including the addition of a can_vec_extract_var_idx_p function
in optabs.cc to check if the backend can handle a register
operand as index. We already have can_vec_extract in
optabs-query but that one checks whether we can extract
specific modes.
With the introduction of an internal function for vec_extract
the expander must not FAIL. For vec_set this has already been
the case so adjust the documentation accordingly.
Additionally, clarify the wording of the vector-vector case for
vec_extract.
gcc/ChangeLog:
* doc/md.texi: Document that vec_set and vec_extract must not
fail.
* gimple-isel.cc (gimple_expand_vec_set_expr): Rename this...
(gimple_expand_vec_set_extract_expr): ...to this.
(gimple_expand_vec_exprs): Call renamed function.
* internal-fn.cc (vec_extract_direct): Add.
(expand_vec_extract_optab_fn): New function to expand
vec_extract optab.
(direct_vec_extract_optab_supported_p): Add.
* internal-fn.def (VEC_EXTRACT): Add.
* optabs.cc (can_vec_extract_var_idx_p): New function.
* optabs.h (can_vec_extract_var_idx_p): Declare.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions