... since it no longer applies to a builtin.
Tested on x86_64-linux.
r~
* target.def (vec_perm_const_ok): Rename from builtin_vec_perm_ok.
* optabs.c (can_vec_perm_expr_p): Update to match.
(expand_vec_perm_expr): Likewise.
* config/i386/i386.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Rename
from TARGET_VECTORIZE_BUILTIN_VEC_PERM_OK.
* doc/tm.texi.in: Likewise.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7750356..b7718e9 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -36446,7 +36446,7 @@ ix86_expand_vec_perm_const (rtx operands[4])
return false;
}
-/* Implement targetm.vectorize.builtin_vec_perm_ok. */
+/* Implement targetm.vectorize.vec_perm_const_ok. */
static bool
ix86_vectorize_vec_perm_const_ok (tree vec_type, tree mask)
@@ -37879,8 +37879,8 @@ ix86_autovectorize_vector_sizes (void)
#undef TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST
#define TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST \
ix86_builtin_vectorization_cost
-#undef TARGET_VECTORIZE_BUILTIN_VEC_PERM_OK
-#define TARGET_VECTORIZE_BUILTIN_VEC_PERM_OK \
+#undef TARGET_VECTORIZE_VEC_PERM_CONST_OK
+#define TARGET_VECTORIZE_VEC_PERM_CONST_OK \
ix86_vectorize_vec_perm_const_ok
#undef TARGET_VECTORIZE_PREFERRED_SIMD_MODE
#define TARGET_VECTORIZE_PREFERRED_SIMD_MODE \
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index c52753a..a43ce3d 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -5711,7 +5711,7 @@ misalignment value (@var{misalign}).
Return true if vector alignment is reachable (by peeling N iterations) for the
given type.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_VECTORIZE_BUILTIN_VEC_PERM_OK (tree
@var{vec_type}, tree @var{mask})
+@deftypefn {Target Hook} bool TARGET_VECTORIZE_VEC_PERM_CONST_OK (tree
@var{vec_type}, tree @var{mask})
Return true if a vector created for @code{vec_perm_const} is valid.
@end deftypefn
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 22e82ee..cede91e 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -5649,7 +5649,7 @@ misalignment value (@var{misalign}).
Return true if vector alignment is reachable (by peeling N iterations) for the
given type.
@end deftypefn
-@hook TARGET_VECTORIZE_BUILTIN_VEC_PERM_OK
+@hook TARGET_VECTORIZE_VEC_PERM_CONST_OK
Return true if a vector created for @code{vec_perm_const} is valid.
@end deftypefn
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 558c0fa..5036856 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -6714,7 +6714,7 @@ can_vec_perm_expr_p (tree type, tree sel)
if (sel == NULL || TREE_CODE (sel) == VECTOR_CST)
{
if (direct_optab_handler (vec_perm_const_optab, mode) != CODE_FOR_nothing
- && (sel == NULL || targetm.vectorize.builtin_vec_perm_ok (type, sel)))
+ && (sel == NULL || targetm.vectorize.vec_perm_const_ok (type, sel)))
return true;
}
@@ -6808,7 +6808,7 @@ expand_vec_perm_expr (tree type, tree v0, tree v1, tree
sel, rtx target)
{
icode = direct_optab_handler (vec_perm_const_optab, mode);
if (icode != CODE_FOR_nothing
- && targetm.vectorize.builtin_vec_perm_ok (TREE_TYPE (v0), sel)
+ && targetm.vectorize.vec_perm_const_ok (TREE_TYPE (v0), sel)
&& (tmp = expand_vec_perm_expr_1 (icode, target, v0_rtx,
v1_rtx, sel_rtx)) != NULL)
return tmp;
diff --git a/gcc/target.def b/gcc/target.def
index c9d6067..60fad2a 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -985,9 +985,9 @@ DEFHOOK
bool, (const_tree type, bool is_packed),
default_builtin_vector_alignment_reachable)
-/* Return true if a vector created for builtin_vec_perm is valid. */
+/* Return true if a vector created for vec_perm_const is valid. */
DEFHOOK
-(builtin_vec_perm_ok,
+(vec_perm_const_ok,
"",
bool, (tree vec_type, tree mask),
hook_bool_tree_tree_true)