[patch] Fix PR testsuite/50435
Ira Rosen
ira.rosen@linaro.org
Sun Sep 18 17:45:00 GMT 2011
Hi,
This patch adds an if-statement to avoid loop vectorization and fixes
underscores around restrict in gcc.dg/vect/bb-slp-25.c.
Tested by Dominique on x86_64-apple-darwin10 and on x86_64-suse-linux.
Committed to trunk.
Ira
2011-09-18 Dominique d'Humieres <dominiq@lps.ens.fr>
Ira Rosen <ira.rosen@linaro.org>
PR testsuite/50435
* gcc.dg/vect/bb-slp-25.c: Add an if to avoid loop vectorization.
Fix underscores around restrict.
Index: testsuite/gcc.dg/vect/bb-slp-25.c
===================================================================
--- testsuite/gcc.dg/vect/bb-slp-25.c (revision 178940)
+++ testsuite/gcc.dg/vect/bb-slp-25.c (working copy)
@@ -9,7 +9,7 @@
short src[N], dst[N];
-void foo (short * __restrict dst, short * __restrict src, int h, int stride)
+void foo (short * __restrict__ dst, short * __restrict__ src, int h,
int stride, int dummy)
{
int i;
h /= 16;
@@ -25,6 +25,8 @@ void foo (short * __restrict dst, short
dst[7] += A*src[7] + src[7+stride];
dst += 8;
src += 8;
+ if (dummy == 32)
+ abort ();
}
}
@@ -41,7 +43,7 @@ int main (void)
src[i] = i;
}
- foo (dst, src, N, 8);
+ foo (dst, src, N, 8, 0);
for (i = 0; i < N/2; i++)
{
More information about the Gcc-patches
mailing list