re PR tree-optimization/63666 (FAIL: gcc.dg/vect/pr45752.c (internal compiler error))

2014-10-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/63666
	* tree-vect-slp.c (vect_get_mask_element): Properly handle
	accessing out-of-bound elements.

From-SVN: r216825
This commit is contained in:
Richard Biener 2014-10-29 09:22:55 +00:00 committed by Richard Biener
parent 65c0707be6
commit 496d3346cf
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2014-10-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/63666
* tree-vect-slp.c (vect_get_mask_element): Properly handle
accessing out-of-bound elements.
2014-10-29 Alexander Ivchenko <alexander.ivchenko@intel.com>
Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Anna Tikhonova <anna.tikhonova@intel.com>

View File

@ -2890,7 +2890,7 @@ vect_get_mask_element (gimple stmt, int first_mask_element, int m,
}
/* The mask requires the next vector. */
if (*current_mask_element >= mask_nunits * 2)
while (*current_mask_element >= mask_nunits * 2)
{
if (*needs_first_vector || *mask_fixed)
{
@ -3041,6 +3041,7 @@ 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);
mask[index++] = current_mask_element;
if (index == nunits)