aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs-query.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-11-14 14:55:12 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-11-14 14:55:12 +0000
commit10116ec1c147a76522cafba6b6a5b4ed1cb37b77 (patch)
tree776dc1f9e2372ad4300b7120c178f4dfc3c7121a /gcc/optabs-query.c
parente8738f4e9686203451fd11f05b268b8a31b95ebd (diff)
downloadgcc-10116ec1c147a76522cafba6b6a5b4ed1cb37b77.zip
gcc-10116ec1c147a76522cafba6b6a5b4ed1cb37b77.tar.gz
gcc-10116ec1c147a76522cafba6b6a5b4ed1cb37b77.tar.bz2
Pass the data vector mode to get_mask_mode
This patch passes the data vector mode to get_mask_mode, rather than its size and nunits. This is a bit simpler and allows targets to distinguish between modes that happen to have the same size and number of elements. 2019-11-14 Richard Sandiford <richard.sandiford@arm.com> gcc/ * target.def (get_mask_mode): Take a vector mode itself as argument, instead of properties about the vector mode. * doc/tm.texi: Regenerate. * targhooks.h (default_get_mask_mode): Update to reflect new get_mode_mask interface. * targhooks.c (default_get_mask_mode): Likewise. Use related_int_vector_mode. * optabs-query.c (can_vec_mask_load_store_p): Update call to get_mask_mode. * tree-vect-stmts.c (check_load_store_masking): Likewise, checking first that the original mode really is a vector. * tree.c (build_truth_vector_type_for): Likewise. * config/aarch64/aarch64.c (aarch64_get_mask_mode): Update for new get_mode_mask interface. (aarch64_expand_sve_vcond): Update call accordingly. * config/gcn/gcn.c (gcn_vectorize_get_mask_mode): Update for new get_mode_mask interface. * config/i386/i386.c (ix86_get_mask_mode): Likewise. From-SVN: r278233
Diffstat (limited to 'gcc/optabs-query.c')
-rw-r--r--gcc/optabs-query.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/optabs-query.c b/gcc/optabs-query.c
index e610e96..d59e116 100644
--- a/gcc/optabs-query.c
+++ b/gcc/optabs-query.c
@@ -585,8 +585,7 @@ can_vec_mask_load_store_p (machine_mode mode,
if (!VECTOR_MODE_P (vmode))
return false;
- if ((targetm.vectorize.get_mask_mode
- (GET_MODE_NUNITS (vmode), GET_MODE_SIZE (vmode)).exists (&mask_mode))
+ if (targetm.vectorize.get_mask_mode (vmode).exists (&mask_mode)
&& convert_optab_handler (op, vmode, mask_mode) != CODE_FOR_nothing)
return true;
@@ -600,7 +599,7 @@ can_vec_mask_load_store_p (machine_mode mode,
continue;
if (mode_for_vector (smode, nunits).exists (&vmode)
&& VECTOR_MODE_P (vmode)
- && targetm.vectorize.get_mask_mode (nunits, cur).exists (&mask_mode)
+ && targetm.vectorize.get_mask_mode (vmode).exists (&mask_mode)
&& convert_optab_handler (op, vmode, mask_mode) != CODE_FOR_nothing)
return true;
}