From e7e17be3be3d43640a9a4a33d59315dec69fdda4 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 17 Aug 2021 15:50:31 +0200 Subject: Fall back to masked_gather_load/masked_scatter_store This adds a fallback to the masked_ variants for gather_load and scatter_store if the latter are not available. 2021-08-17 Richard Biener * optabs-query.c (supports_vec_gather_load_p): Also check for masked optabs. (supports_vec_scatter_store_p): Likewise. * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Fall back to masked variants if non-masked are not supported. * tree-vect-patterns.c (vect_recog_gather_scatter_pattern): When we need to use masked gather/scatter but do not have a mask set up a constant true one. * tree-vect-stmts.c (vect_check_scalar_mask): Also allow non-SSA_NAME masks. --- gcc/tree-vect-stmts.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'gcc/tree-vect-stmts.c') diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index cc6c091..4e0b2ad 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -2510,14 +2510,6 @@ vect_check_scalar_mask (vec_info *vinfo, stmt_vec_info stmt_info, return false; } - if (TREE_CODE (*mask) != SSA_NAME) - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "mask argument is not an SSA name.\n"); - return false; - } - /* If the caller is not prepared for adjusting an external/constant SLP mask vector type fail. */ if (slp_node -- cgit v1.1