This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
data dependence for pointers broken?
- From: Richard Henderson <rth at redhat dot com>
- To: Sebastian Pop <s dot pop at laposte dot net>, gcc at gcc dot gnu dot org
- Date: Sun, 18 Sep 2005 12:59:13 -0700
- Subject: data dependence for pointers broken?
All this code in tree-data-ref.c is supposed to work on pointers,
isn't it? The comments seem to say so.
Except that it doesn't seem to work for even the simplest of test
cases. For instance, it reports dont_know for two uses of the
same SSA_NAME. This doesn't fill me with confidence ...
Here's the test case I'm looking at with -O2 -ftree-vectorize.
r~
typedef unsigned char auchar __attribute__ ((__aligned__(16)));
#define MAX_LEN 1024
#define WIDTH 8
#define COLOR 128
void digital_chromakey(auchar * __restrict__ image1,
auchar * __restrict__ image2, unsigned long int len)
{
unsigned long int i;
unsigned char x, y;
for (i = 0; i < WIDTH * len; i++) {
x = image1[i];
y = image2[i];
image1[i] = (x == COLOR ? y : x);
}
}