+2019-10-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/92162
+ * tree-vect-loop.c (vect_create_epilog_for_reduction): Lookup
+ STMT_VINFO_REDUC_IDX in reduc_info.
+ * tree-vect-stmts.c (vectorizable_condition): Likewise.
+
2019-10-21 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (_slp_tree::ops): New member.
+2019-10-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/92162
+ * gcc.dg/pr92162.c: New testcase.
+
2019-10-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/92161
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Ofast" } */
+
+short int s8;
+
+void __attribute__ ((simd))
+gn (void)
+{
+ s8 = 0;
+}
(CCOMPARE). The then and else values mirror the main VEC_COND_EXPR:
the reduction phi corresponds to NEW_PHI_TREE and the new values
correspond to INDEX_BEFORE_INCR. */
- gcc_assert (STMT_VINFO_REDUC_IDX (stmt_info) >= 1);
+ gcc_assert (STMT_VINFO_REDUC_IDX (reduc_info) >= 1);
tree index_cond_expr;
- if (STMT_VINFO_REDUC_IDX (stmt_info) == 2)
+ if (STMT_VINFO_REDUC_IDX (reduc_info) == 2)
index_cond_expr = build3 (VEC_COND_EXPR, cr_index_vector_type,
ccompare, indx_before_incr, new_phi_tree);
else
return false;
reduc_info = info_for_reduction (stmt_info);
reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info);
- reduc_index = STMT_VINFO_REDUC_IDX (stmt_info);
+ reduc_index = STMT_VINFO_REDUC_IDX (reduc_info);
gcc_assert (reduction_type != EXTRACT_LAST_REDUCTION
|| reduc_index != -1);
}