aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKewen Lin <linkw@linux.ibm.com>2020-06-27 21:17:04 -0500
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:15:12 -0300
commit0e460eb019fa7333a8ee235d809d785d1f16982b (patch)
tree8d1b31d5ec9980bd95aac52528c5056c3915cb4f /gcc
parent8ec9e96c91b175529f3f83d90620951897be477f (diff)
downloadgcc-0e460eb019fa7333a8ee235d809d785d1f16982b.zip
gcc-0e460eb019fa7333a8ee235d809d785d1f16982b.tar.gz
gcc-0e460eb019fa7333a8ee235d809d785d1f16982b.tar.bz2
IFN: Fix mask_{load,store} optab support macros
When I am working on IFNs for vector with length, I noticed that the current optab support query for mask_load/mask_store looks unexpected. The mask_load/mask_store requires two modes for convert_optab query, but the macros direct_mask_{load,store}_optab_supported_p uses direct_optab_supported_p which asserts type pair should have the same mode. I'm not sure whether we have some special reason here or just a typo, since everything goes well now, mask_{load,store} optab check is mainly handled by can_vec_mask_load_store_p. But if we have some codes as below (eg: one checking for all IFNs finally) tree_pair types = direct_internal_fn_types (ifn, call); if(direct_internal_fn_supported_p (ifn, types, OPTIMIZE_FOR_SPEED) ... It will cause ICE. gcc/ChangeLog: * internal-fn.c (direct_mask_load_optab_supported_p): Use convert_optab_supported_p instead of direct_optab_supported_p. (direct_mask_store_optab_supported_p): Likewise.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/internal-fn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index 2329e3d..0be2eb4 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -3213,11 +3213,11 @@ multi_vector_optab_supported_p (convert_optab optab, tree_pair types,
#define direct_cond_unary_optab_supported_p direct_optab_supported_p
#define direct_cond_binary_optab_supported_p direct_optab_supported_p
#define direct_cond_ternary_optab_supported_p direct_optab_supported_p
-#define direct_mask_load_optab_supported_p direct_optab_supported_p
+#define direct_mask_load_optab_supported_p convert_optab_supported_p
#define direct_load_lanes_optab_supported_p multi_vector_optab_supported_p
#define direct_mask_load_lanes_optab_supported_p multi_vector_optab_supported_p
#define direct_gather_load_optab_supported_p convert_optab_supported_p
-#define direct_mask_store_optab_supported_p direct_optab_supported_p
+#define direct_mask_store_optab_supported_p convert_optab_supported_p
#define direct_store_lanes_optab_supported_p multi_vector_optab_supported_p
#define direct_mask_store_lanes_optab_supported_p multi_vector_optab_supported_p
#define direct_vec_cond_mask_optab_supported_p multi_vector_optab_supported_p