re PR tree-optimization/41956 (Segfault in vectorizer)
PR tree-optimization/41956 * tree-vect-analyze.c (vect_supported_load_permutation_p): Add check that the load indices differ. From-SVN: r155614
This commit is contained in:
parent
dcf553531f
commit
deca952548
|
@ -1,3 +1,9 @@
|
|||
2010-01-04 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
PR tree-optimization/41956
|
||||
* tree-vect-analyze.c (vect_supported_load_permutation_p): Add check
|
||||
that the load indices differ.
|
||||
|
||||
2010-01-02 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
Backport from mainline
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-01-04 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
PR tree-optimization/41956
|
||||
* gcc.dg/vect/pr41956.c: New test.
|
||||
|
||||
2010-01-02 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
Backport from mainline
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target vect_int } */
|
||||
|
||||
void K (int *gpwgts, int *badminpwgt, int *badmaxpwgt)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 10; i += 2) {
|
||||
badminpwgt[i] = badminpwgt[i+1] = gpwgts[i]+gpwgts[i];
|
||||
badmaxpwgt[i] = badmaxpwgt[i+1] = gpwgts[i]+gpwgts[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* { dg-final { cleanup-tree-dump "vect" } } */
|
||||
|
|
@ -3213,6 +3213,7 @@ vect_supported_load_permutation_p (slp_instance slp_instn, int group_size,
|
|||
{
|
||||
int i = 0, j, prev = -1, next, k;
|
||||
bool supported;
|
||||
sbitmap load_index;
|
||||
|
||||
/* FORNOW: permutations are only supported for loop-aware SLP. */
|
||||
if (!slp_instn)
|
||||
|
@ -3233,6 +3234,8 @@ vect_supported_load_permutation_p (slp_instance slp_instn, int group_size,
|
|||
return false;
|
||||
|
||||
supported = true;
|
||||
load_index = sbitmap_alloc (group_size);
|
||||
sbitmap_zero (load_index);
|
||||
for (j = 0; j < group_size; j++)
|
||||
{
|
||||
for (i = j * group_size, k = 0;
|
||||
|
@ -3246,9 +3249,19 @@ vect_supported_load_permutation_p (slp_instance slp_instn, int group_size,
|
|||
}
|
||||
|
||||
prev = next;
|
||||
}
|
||||
}
|
||||
|
||||
if (TEST_BIT (load_index, prev))
|
||||
{
|
||||
supported = false;
|
||||
break;
|
||||
}
|
||||
|
||||
SET_BIT (load_index, prev);
|
||||
}
|
||||
|
||||
sbitmap_free (load_index);
|
||||
|
||||
if (supported && i == group_size * group_size
|
||||
&& vect_supported_slp_permutation_p (slp_instn))
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue