Commit c8047699 by Richard Biener Committed by Richard Biener

tree-vect-data-refs.c (vect_analyze_group_access): Properly compute GROUP_SIZE for basic-block SLP.

2015-04-29  Richard Biener  <rguenther@suse.de>

	* tree-vect-data-refs.c (vect_analyze_group_access): Properly
	compute GROUP_SIZE for basic-block SLP.
	* tree-vect-slp.c (vect_get_place_in_interleaving_chain): Properly
	take into account gaps.
	(vect_get_mask_element): Properly reject references to previous
	vectors.
	(vect_transform_slp_perm_load): Likewise.

From-SVN: r222560
parent b4d1725b
2015-04-29 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_analyze_group_access): Properly
compute GROUP_SIZE for basic-block SLP.
* tree-vect-slp.c (vect_get_place_in_interleaving_chain): Properly
take into account gaps.
(vect_get_mask_element): Properly reject references to previous
vectors.
(vect_transform_slp_perm_load): Likewise.
2015-04-29 Christian Bruel <christian.bruel@st.com>
PR target/64835
......
......@@ -2245,7 +2245,7 @@ vect_analyze_group_access (struct data_reference *dr)
}
if (groupsize == 0)
groupsize = count;
groupsize = count + gaps;
GROUP_SIZE (vinfo_for_stmt (stmt)) = groupsize;
if (dump_enabled_p ())
......
......@@ -223,8 +223,9 @@ vect_get_place_in_interleaving_chain (gimple stmt, gimple first_stmt)
{
if (next_stmt == stmt)
return result;
result++;
next_stmt = GROUP_NEXT_ELEMENT (vinfo_for_stmt (next_stmt));
if (next_stmt)
result += GROUP_GAP (vinfo_for_stmt (next_stmt));
}
while (next_stmt);
......@@ -3008,6 +3009,18 @@ vect_get_mask_element (gimple stmt, int first_mask_element, int m,
/* Adjust the value in case it's a mask for second and third vectors. */
*current_mask_element -= mask_nunits * (*number_of_mask_fixes - 1);
if (*current_mask_element < 0)
{
if (dump_enabled_p ())
{
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"permutation requires past vector ");
dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
}
return false;
}
if (*current_mask_element < mask_nunits)
*needs_first_vector = true;
......@@ -3178,7 +3191,8 @@ vect_transform_slp_perm_load (slp_tree node, vec<tree> dr_chain,
&number_of_mask_fixes, &mask_fixed,
&needs_first_vector))
return false;
gcc_assert (current_mask_element < 2 * nunits);
gcc_assert (current_mask_element >= 0
&& current_mask_element < 2 * nunits);
mask[index++] = current_mask_element;
if (index == nunits)
......
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