This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[testsuite] Tweak gcc.dg/vect/vect-peel-3.c


Hi,

gcc.dg/vect/vect-peel-3.c almost passes on the SPARC, but one of the 2 loops 
isn't vectorized because there is an unsupported shift operation:

  for (i = 0; i < N+10; i++)
    {
      ib[i] = i;
      ic[i] = i+2;
      ia[i] = i/2;
    } 

so I suggest changing the '/' into a '-'.  OK for mainline?


2010-11-22  Eric Botcazou  <ebotcazou@adacore.com>

	PR testsuite/46230
	* gcc.dg/vect/vect-peel-3.c (RES): Adjust.
	(main): Use subtraction instead of division by 2.


-- 
Eric Botcazou
Index: gcc.dg/vect/vect-peel-3.c
===================================================================
--- gcc.dg/vect/vect-peel-3.c	(revision 167028)
+++ gcc.dg/vect/vect-peel-3.c	(working copy)
@@ -4,7 +4,7 @@
 #include "tree-vect.h"
 
 #define N 128
-#define RES 21888 
+#define RES 25792
 
 /* unaligned store.  */
 
@@ -42,7 +42,7 @@ int main (void)
     {
       ib[i] = i;
       ic[i] = i+2;
-      ia[i] = i/2;
+      ia[i] = i-2;
     } 
 
   return main1 ();

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]