re PR tree-optimization/41956 (Segfault in vectorizer)
PR tree-optimization/41956 * tree-vect-slp.c (vect_supported_load_permutation_p): Add check that the load indices differ. From-SVN: r155523
This commit is contained in:
parent
b8699cfb5c
commit
7417f6c0bd
@ -1,3 +1,9 @@
|
||||
2009-12-30 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
PR tree-optimization/41956
|
||||
* tree-vect-slp.c (vect_supported_load_permutation_p): Add check that
|
||||
the load indices differ.
|
||||
|
||||
2009-12-30 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/42549
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-12-30 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
PR tree-optimization/41956
|
||||
* gcc.dg/vect/pr41956.c: New test.
|
||||
|
||||
2009-12-30 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/42549
|
||||
|
13
gcc/testsuite/gcc.dg/vect/pr41956.c
Normal file
13
gcc/testsuite/gcc.dg/vect/pr41956.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* { 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" } } */
|
@ -796,6 +796,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 in SLP. */
|
||||
if (!slp_instn)
|
||||
@ -816,6 +817,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;
|
||||
@ -830,8 +833,18 @@ 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
Block a user