aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorBin Cheng <bin.cheng@arm.com>2016-09-15 16:31:35 +0000
committerBin Cheng <amker@gcc.gnu.org>2016-09-15 16:31:35 +0000
commit7e16ce79a4033d8bba49a1f388041f1ba52f1481 (patch)
tree64c5356862fbe772dbead17cbce71cf117afdcd0 /gcc/tree-vectorizer.h
parent7c05f5c46d5b0db80d65bec5f14a893d0e939c85 (diff)
downloadgcc-7e16ce79a4033d8bba49a1f388041f1ba52f1481.zip
gcc-7e16ce79a4033d8bba49a1f388041f1ba52f1481.tar.gz
gcc-7e16ce79a4033d8bba49a1f388041f1ba52f1481.tar.bz2
re PR tree-optimization/77503 (ICE in vect_transform_stmt compiling postgresql)
PR tree-optimization/77503 * tree-vect-loop.c (vectorizable_reduction): Record reduction code for CONST_COND_REDUCTION at analysis stage and use it at transform stage. * tree-vectorizer.h (struct _stmt_vec_info): New field. (STMT_VINFO_VEC_CONST_COND_REDUC_CODE): New macro. * tree-vect-stmts.c (new_stmt_vec_info): Initialize above new field. gcc/testsuite * gcc.dg/vect/pr77503.c: New test. From-SVN: r240166
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 29ef676..240af06 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -657,6 +657,9 @@ typedef struct _stmt_vec_info {
/* For reduction loops, this is the type of reduction. */
enum vect_reduction_type v_reduc_type;
+ /* For CONST_COND_REDUCTION, record the reduc code. */
+ enum tree_code const_cond_reduc_code;
+
/* The number of scalar stmt references from active SLP instances. */
unsigned int num_slp_uses;
} *stmt_vec_info;
@@ -711,6 +714,7 @@ STMT_VINFO_BB_VINFO (stmt_vec_info stmt_vinfo)
#define STMT_VINFO_MEMORY_ACCESS_TYPE(S) (S)->memory_access_type
#define STMT_VINFO_SIMD_LANE_ACCESS_P(S) (S)->simd_lane_access_p
#define STMT_VINFO_VEC_REDUCTION_TYPE(S) (S)->v_reduc_type
+#define STMT_VINFO_VEC_CONST_COND_REDUC_CODE(S) (S)->const_cond_reduc_code
#define STMT_VINFO_DR_BASE_ADDRESS(S) (S)->dr_base_address
#define STMT_VINFO_DR_INIT(S) (S)->dr_init