aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-09-20 09:54:54 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-09-20 09:54:54 +0000
commitd63eadac7db10d4846bdffa93fd164cb035fb102 (patch)
treeef1dc5db6c4ed322f9ed8485cabbf001647679c7 /gcc/tree-vectorizer.h
parent9ba4312712a96eba938c9d280e57f71929cdef41 (diff)
downloadgcc-d63eadac7db10d4846bdffa93fd164cb035fb102.zip
gcc-d63eadac7db10d4846bdffa93fd164cb035fb102.tar.gz
gcc-d63eadac7db10d4846bdffa93fd164cb035fb102.tar.bz2
re PR testsuite/91821 (r275928 breaks gcc.target/powerpc/sad-vectorize-2.c)
2019-09-20 Richard Biener <rguenther@suse.de> PR tree-optimization/91821 * tree-vect-loop.c (check_reduction_path): Check we can compute reduc_idx. (vect_is_simple_reduction): Set STMT_VINFO_REDUC_IDX. * tree-vect-patterns.c (vect_reassociating_reduction_p): Return operands in canonical order. * tree-vectorizer.c (vec_info::new_stmt_vec_info): Initialize STMT_VINFO_REDUC_IDX. * tree-vectorizer.h (_stmt_vec_info::reduc_idx): New. (STMT_VINFO_REDUC_IDX): Likewise. From-SVN: r275996
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index a514c77..09d31ec 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -941,6 +941,10 @@ public:
vect_force_simple_reduction. */
enum vect_reduction_type reduc_type;
+ /* On a stmt participating in the reduction the index of the operand
+ on the reduction SSA cycle. */
+ int reduc_idx;
+
/* On a reduction PHI the def returned by vect_force_simple_reduction.
On the def returned by vect_force_simple_reduction the
corresponding PHI. */
@@ -1030,6 +1034,7 @@ STMT_VINFO_BB_VINFO (stmt_vec_info stmt_vinfo)
#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_REDUC_IDX(S) (S)->reduc_idx
#define STMT_VINFO_DR_WRT_VEC_LOOP(S) (S)->dr_wrt_vec_loop
#define STMT_VINFO_DR_BASE_ADDRESS(S) (S)->dr_wrt_vec_loop.base_address