Patchwork Do not XFAIL vectorizer testcases for some targets

login
register
mail settings
Submitter Eric Botcazou
Date Jan. 10, 2011, 12:39 p.m.
Message ID <201101101339.55704.ebotcazou@adacore.com>
Download mbox | patch
Permalink /patch/78134/
State New
Headers show

Comments

Eric Botcazou - Jan. 10, 2011, 12:39 p.m.
For quite some time gcc.dg/vect/vect-peel-1.c and gcc.dg/vect/vect-peel-2.c 
XPASS on SPARC and IA-64:
  http://gcc.gnu.org/ml/gcc-testresults/2011-01/msg00535.html
  http://gcc.gnu.org/ml/gcc-testresults/2011-01/msg00728.html

The attached patch removes the XFAIL and also applies the same transformation 
that was applied to gcc.dg/vect/vect-peel-3.c some time ago (preventing the 
initialization loop from being vectorized) so as to have a uniform set of 
dg-final directives across the 4 vect-peel testcases.

Tested on SPARC/Solaris 32-bit and 64-bit, applied on the mainline as obvious.


2011-01-10  Eric Botcazou  <ebotcazou@adacore.com>

	PR testsuite/46230
	* gcc.dg/vect/vect-peel-1.c (main): Prevent initialization loop from
	being vectorized.  Adjust dg-final pattern.  Remove XFAIL.
	* gcc.dg/vect/vect-peel-2.c (main): Likewise.
	* gcc.dg/vect/vect-peel-4.c (main): Prevent initialization loop from
	being vectorized.  Adjust dg-final pattern.

Patch

Index: gcc.dg/vect/vect-peel-1.c
===================================================================
--- gcc.dg/vect/vect-peel-1.c	(revision 168594)
+++ gcc.dg/vect/vect-peel-1.c	(working copy)
@@ -40,13 +40,15 @@  int main (void)
   check_vect ();
 
   for (i = 0; i <= N+6; i++)
-    ib[i] = i;
+    {
+      asm volatile ("" : "+r" (i));
+      ib[i] = i;
+    }
 
   return main1 ();
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail  vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align  } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail  vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-peel-2.c
===================================================================
--- gcc.dg/vect/vect-peel-2.c	(revision 168594)
+++ gcc.dg/vect/vect-peel-2.c	(working copy)
@@ -41,13 +41,15 @@  int main (void)
   check_vect ();
 
   for (i = 0; i <= N+6; i++)
-    ib[i] = i;
+    {
+      asm volatile ("" : "+r" (i));
+      ib[i] = i;
+    }
 
   return main1 ();
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail  vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align  } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target vect_element_align } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-peel-4.c
===================================================================
--- gcc.dg/vect/vect-peel-4.c	(revision 168594)
+++ gcc.dg/vect/vect-peel-4.c	(working copy)
@@ -36,12 +36,15 @@  int main (void)
   check_vect ();
 
   for (i = 0; i <= N+6; i++)
-    ib[i] = i;
+    {
+      asm volatile ("" : "+r" (i));
+      ib[i] = i;
+    }
 
   return main1 ();
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"  { xfail vect_no_align } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */