aboutsummaryrefslogtreecommitdiff
path: root/gcc/internal-fn.c
diff options
context:
space:
mode:
authorAlejandro Martinez <alejandro.martinezvicente@arm.com>2019-06-18 08:09:00 +0000
committerAlejandro Martinez <alejandro@gcc.gnu.org>2019-06-18 08:09:00 +0000
commitbce29d65ebe1316d15ec7582a1d257ef1be163f7 (patch)
tree5e31c8b01fcf9fd667adb0a813ad377f34961fae /gcc/internal-fn.c
parent9553f0d2216d4475d4d1afaa748b6b02f56c057b (diff)
downloadgcc-bce29d65ebe1316d15ec7582a1d257ef1be163f7.zip
gcc-bce29d65ebe1316d15ec7582a1d257ef1be163f7.tar.gz
gcc-bce29d65ebe1316d15ec7582a1d257ef1be163f7.tar.bz2
[Vectorizer] Support masking fold left reductions
This patch adds support in the vectorizer for masking fold left reductions. This avoids the need to insert a conditional assignement with some identity value. From-SVN: r272407
Diffstat (limited to 'gcc/internal-fn.c')
-rw-r--r--gcc/internal-fn.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index 04081f3..90f8e56 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -117,6 +117,7 @@ init_internal_fns ()
#define while_direct { 0, 2, false }
#define fold_extract_direct { 2, 2, false }
#define fold_left_direct { 1, 1, false }
+#define mask_fold_left_direct { 1, 1, false }
const direct_internal_fn_info direct_internal_fn_array[IFN_LAST + 1] = {
#define DEF_INTERNAL_FN(CODE, FLAGS, FNSPEC) not_direct,
@@ -3000,6 +3001,9 @@ expand_while_optab_fn (internal_fn, gcall *stmt, convert_optab optab)
#define expand_fold_left_optab_fn(FN, STMT, OPTAB) \
expand_direct_optab_fn (FN, STMT, OPTAB, 2)
+#define expand_mask_fold_left_optab_fn(FN, STMT, OPTAB) \
+ expand_direct_optab_fn (FN, STMT, OPTAB, 3)
+
/* RETURN_TYPE and ARGS are a return type and argument list that are
in principle compatible with FN (which satisfies direct_internal_fn_p).
Return the types that should be used to determine whether the
@@ -3088,6 +3092,7 @@ multi_vector_optab_supported_p (convert_optab optab, tree_pair types,
#define direct_while_optab_supported_p convert_optab_supported_p
#define direct_fold_extract_optab_supported_p direct_optab_supported_p
#define direct_fold_left_optab_supported_p direct_optab_supported_p
+#define direct_mask_fold_left_optab_supported_p direct_optab_supported_p
/* Return the optab used by internal function FN. */