From: Richard Biener Date: Wed, 29 Oct 2014 09:22:55 +0000 (+0000) Subject: re PR tree-optimization/63666 (FAIL: gcc.dg/vect/pr45752.c (internal compiler error)) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=496d3346cfeeb96c46d299dc55a86082f544824f;p=gcc.git re PR tree-optimization/63666 (FAIL: gcc.dg/vect/pr45752.c (internal compiler error)) 2014-10-29 Richard Biener PR tree-optimization/63666 * tree-vect-slp.c (vect_get_mask_element): Properly handle accessing out-of-bound elements. From-SVN: r216825 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 514cdd54990..89665cfacd5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-10-29 Richard Biener + + PR tree-optimization/63666 + * tree-vect-slp.c (vect_get_mask_element): Properly handle + accessing out-of-bound elements. + 2014-10-29 Alexander Ivchenko Maxim Kuznetsov Anna Tikhonova diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 90f5ef4b8da..84bec9544fe 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -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 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)