Commit 96d9d162 by Richard Biener Committed by Richard Biener

re PR tree-optimization/92252 (ICE: Segmentation fault (in vect_stmt_to_vectorize))

2019-10-28  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/92252
	* tree-vect-slp.c (vect_get_and_check_slp_defs): Adjust
	STMT_VINFO_REDUC_IDX when swapping operands.

	* gcc.dg/torture/pr92252.c: New testcase.

From-SVN: r277517
parent 97c6bea8
2019-10-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/92252
* tree-vect-slp.c (vect_get_and_check_slp_defs): Adjust
STMT_VINFO_REDUC_IDX when swapping operands.
2019-10-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/92241
* tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): When
we failed to update the reduction index do not use the pattern
2019-10-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/92252
* gcc.dg/torture/pr92252.c: New testcase.
2019-10-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/92241
* gcc.dg/torture/pr92241.c: New testcase.
......
/* { do-do compile } */
/* { dg-additional-options "-ftree-vectorize" } */
long int ar;
int dt;
long int
pc (unsigned long int q3, int zw)
{
long int em = 0;
while (zw < 1)
{
q3 = zw * 2ul;
if (q3 != 0)
for (ar = 0; ar < 2; ++ar)
em = dt;
++zw;
}
return em;
}
......@@ -563,6 +563,10 @@ again:
{
swap_ssa_operands (stmt, gimple_assign_rhs2_ptr (stmt),
gimple_assign_rhs3_ptr (stmt));
if (STMT_VINFO_REDUC_IDX (stmt_info) == 1)
STMT_VINFO_REDUC_IDX (stmt_info) = 2;
else if (STMT_VINFO_REDUC_IDX (stmt_info) == 2)
STMT_VINFO_REDUC_IDX (stmt_info) = 1;
bool honor_nans = HONOR_NANS (TREE_OPERAND (cond, 0));
code = invert_tree_comparison (TREE_CODE (cond), honor_nans);
gcc_assert (code != ERROR_MARK);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment