aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorAlejandro Martinez <alejandro.martinezvicente@arm.com>2019-05-28 13:48:44 +0000
committerAlejandro Martinez <alejandro@gcc.gnu.org>2019-05-28 13:48:44 +0000
commit997636716c5dde7d59d026726a6f58918069f122 (patch)
treed18d1d7f5388bc0bb743583ce506e284c8eb60d3 /gcc/tree-vectorizer.h
parent8b4e7143550cd1f3f4b1dca005a5e656506979d9 (diff)
downloadgcc-997636716c5dde7d59d026726a6f58918069f122.zip
gcc-997636716c5dde7d59d026726a6f58918069f122.tar.gz
gcc-997636716c5dde7d59d026726a6f58918069f122.tar.bz2
Current vectoriser doesn't support masked loads for SLP.
Current vectoriser doesn't support masked loads for SLP. We should add that, to allow things like: void f (int *restrict x, int *restrict y, int *restrict z, int n) { for (int i = 0; i < n; i += 2) { x[i] = y[i] ? z[i] : 1; x[i + 1] = y[i + 1] ? z[i + 1] : 2; } } to be vectorized using contiguous loads rather than LD2 and ST2. This patch was motivated by SVE, but it is completely generic and should apply to any architecture with masked loads. From-SVN: r271704
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index d5fd469..4db30cc 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -396,7 +396,7 @@ typedef struct _loop_vec_info : public vec_info {
/* Condition under which this loop is analyzed and versioned. */
tree num_iters_assumptions;
- /* Threshold of number of iterations below which vectorzation will not be
+ /* Threshold of number of iterations below which vectorization will not be
performed. It is calculated from MIN_PROFITABLE_ITERS and
PARAM_MIN_VECT_LOOP_BOUND. */
unsigned int th;
@@ -946,6 +946,9 @@ struct _stmt_vec_info {
and OPERATION_BITS without changing the result. */
unsigned int operation_precision;
signop operation_sign;
+
+ /* True if this is only suitable for SLP vectorization. */
+ bool slp_vect_only_p;
};
/* Information about a gather/scatter call. */
@@ -1041,6 +1044,7 @@ STMT_VINFO_BB_VINFO (stmt_vec_info stmt_vinfo)
#define STMT_VINFO_NUM_SLP_USES(S) (S)->num_slp_uses
#define STMT_VINFO_REDUC_TYPE(S) (S)->reduc_type
#define STMT_VINFO_REDUC_DEF(S) (S)->reduc_def
+#define STMT_VINFO_SLP_VECT_ONLY(S) (S)->slp_vect_only_p
#define DR_GROUP_FIRST_ELEMENT(S) \
(gcc_checking_assert ((S)->dr_aux.dr), (S)->first_element)