[PATCH]: Fix some simple dependence cases

Dorit Naishlos DORIT@il.ibm.com
Tue Sep 20 05:56:00 GMT 2005





Daniel Berlin <dberlin@dberlin.org> wrote on 19/09/2005 21:12:32:

> ...
>
> The second one is that the test needs to be updated, and i didn't
> include the testsuite diff in my patch.
>
> It now correctly determines that there is no dependence in the first
> loop in vect-dv-2.c between A[i] and A[i+20] (because it's always
> outside the iteration range of the loop), so it doesn't need to check
> the alignment anymore.
>
> I've simply updated the number, if someone wants to redo the testcase
> (or tell me how) so it still checks alignment somehow, that's fine.
>

We just had the same issue on autovect-branch after merging from mainline.
In order to preserve the behavior of the test we just changed the loop
bound:

--- vect-dv-2.c 2005-09-20 08:50:08.844209688 +0300
+++ /home/dorit/mainline_cvs/gcc/gcc/testsuite/gcc.dg/vect/vect-dv-2.c
2005-06-17 02:39:50.000000000 +0300
@@ -29,15 +29,15 @@
     }

   /* Vectorizable */
-  for (i = 0; i < N-20 ; i++)
+  for (i = 0; i < 16; i++)
     {
       A[i] = A[i+20];
     }

   /* check results:  */
-  for (i = 0; i < N-20; i++)
+  for (i = 0; i < 16; i++)
     {
-      if (A[i] != D[i+20])
+      if (A[i] != A[i+20])
        abort ();
     }

dorit

> The full patch, including the testsuite diff, is attached.
>
>
>
> >
> > r~
> [attachment "datadep.diff" deleted by Dorit Naishlos/Haifa/IBM]



More information about the Gcc-patches mailing list