[Bug tree-optimization/33707] New: missed optimization with dependency checker
victork at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Oct 9 06:44:00 GMT 2007
Dependency checker fails to build distance vector for the following example:
int
foo (char *a, unsigned n)
{
int i;
a[0] = 0;
for (i = 16; i < n; i++)
a[i] = a[i-16];
}
Compiled with
gcc -O2 -ftree-vectorize -maltivec -fdump-tree-vect-details -S t.c
>From the vectorizer dump:
...
(overlap_iterations_b = not known
)
)
(dependence classified: scev_not_known)
)
)
...
However, it succeeds to calculate distance vector if number of iterations is
known constant:
int
foo (char *a, unsigned n)
{
int i;
a[0] = 0;
for (i = 16; i < 128; i++)
{
a[i] = a[i-16];
}
}
>From dump of vectorizer:
....
)
(build_classic_dist_vector
dist_vector = ( 16
)
)
)
)
....
-- Victor
--
Summary: missed optimization with dependency checker
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: minor
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: victork at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33707
More information about the Gcc-bugs
mailing list