Patchwork Fix PR testsuite/50435

login
register
mail settings
Submitter Ira Rosen
Date Sept. 18, 2011, 11:42 a.m.
Message ID <CAKSNEw5GNovkUqsg4onq29V3V_T9soEnDN_tr0532TD2jJF2gg@mail.gmail.com>
Download mbox | patch
Permalink /patch/115229/
State New
Headers show

Comments

Ira Rosen - Sept. 18, 2011, 11:42 a.m.
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.

   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++)
     {

Patch

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;