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]

tidy some vector xfails


Renamed vect_no_max because the test really means to apply to ints.
The targets in question actually have max for smaller types.

Added vect_no_int_add to cope with Alpha only supporting plus via
emulation, and thus only on smaller types where the overhead of the
bitmasking is sufficiently amortized.

Updates the reduction tests to use these queries rather than hard
code particular platforms.


r~


        * lib/target-supports.exp (check_effective_target_vect_no_int_max):
        Rename from check_effective_target_vect_no_max.
        (check_effective_target_vect_no_int_add): New.
        * gcc.dg/vect/vect-13.c: Use vect_no_int_max.
        * gcc.dg/vect/vect-91.c: Use vect_no_int_add.
        * gcc.dg/vect/vect-reduc-3.c: Likewise.
        * gcc.dg/vect/vect-reduc-1.c: Use both.
        * gcc.dg/vect/vect-reduc-2.c: Likewise.

Index: testsuite/gcc.dg/vect/vect-13.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/vect/vect-13.c,v
retrieving revision 1.10
diff -u -p -d -r1.10 vect-13.c
--- testsuite/gcc.dg/vect/vect-13.c	31 Mar 2005 18:34:16 -0000	1.10
+++ testsuite/gcc.dg/vect/vect-13.c	29 Jun 2005 18:16:34 -0000
@@ -36,6 +36,6 @@ int main (void)
   return main1 ();
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_max } } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/vect/vect-91.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/vect/vect-91.c,v
retrieving revision 1.2
diff -u -p -d -r1.2 vect-91.c
--- testsuite/gcc.dg/vect/vect-91.c	10 Jun 2005 14:52:01 -0000	1.2
+++ testsuite/gcc.dg/vect/vect-91.c	29 Jun 2005 18:16:34 -0000
@@ -63,7 +63,7 @@ main3 ()
 /* Currently only the loops in main2 and main3 get vectorized. After the merge 
    of the datarefs-analysis cleanups from autovect-branch to mainline, the loop
    in main1 will also be vectorized.  */ 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail vect_no_int_add } } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
 /* { dg-final { scan-tree-dump-times "accesses have the same alignment." 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" } } */
Index: testsuite/gcc.dg/vect/vect-reduc-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/vect/vect-reduc-1.c,v
retrieving revision 1.6
diff -u -p -d -r1.6 vect-reduc-1.c
--- testsuite/gcc.dg/vect/vect-reduc-1.c	28 Jun 2005 07:33:11 -0000	1.6
+++ testsuite/gcc.dg/vect/vect-reduc-1.c	29 Jun 2005 18:16:35 -0000
@@ -50,5 +50,5 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_max } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/vect/vect-reduc-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/vect/vect-reduc-2.c,v
retrieving revision 1.6
diff -u -p -d -r1.6 vect-reduc-2.c
--- testsuite/gcc.dg/vect/vect-reduc-2.c	28 Jun 2005 07:33:11 -0000	1.6
+++ testsuite/gcc.dg/vect/vect-reduc-2.c	29 Jun 2005 18:16:35 -0000
@@ -47,5 +47,5 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_max } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/vect/vect-reduc-3.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/vect/vect-reduc-3.c,v
retrieving revision 1.5
diff -u -p -d -r1.5 vect-reduc-3.c
--- testsuite/gcc.dg/vect/vect-reduc-3.c	21 Jun 2005 09:01:59 -0000	1.5
+++ testsuite/gcc.dg/vect/vect-reduc-3.c	29 Jun 2005 18:16:35 -0000
@@ -36,5 +36,5 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_add } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/lib/target-supports.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/target-supports.exp,v
retrieving revision 1.66
diff -u -p -d -r1.66 target-supports.exp
--- testsuite/lib/target-supports.exp	29 Jun 2005 17:27:23 -0000	1.66
+++ testsuite/lib/target-supports.exp	29 Jun 2005 18:16:37 -0000
@@ -962,24 +962,45 @@ proc check_effective_target_vect_double 
 }
 
 # Return 1 if the target plus current options does not support a vector
-# max instruction, 0 otherwise.
+# max instruction on "int", 0 otherwise.
 #
 # This won't change for different subtargets so cache the result.
 
-proc check_effective_target_vect_no_max { } {
-    global et_vect_no_max_saved
+proc check_effective_target_vect_no_int_max { } {
+    global et_vect_no_int_max_saved
 
-    if [info exists et_vect_no_max_saved] {
-	verbose "check_effective_target_vect_no_max: using cached result" 2
+    if [info exists et_vect_no_int_max_saved] {
+	verbose "check_effective_target_vect_no_int_max: using cached result" 2
     } else {
-	set et_vect_no_max_saved 0
+	set et_vect_no_int_max_saved 0
 	if { [istarget sparc*-*-*]
 	     || [istarget alpha*-*-*] } {
-	    set et_vect_no_max_saved 1
+	    set et_vect_no_int_max_saved 1
 	}
     }
-    verbose "check_effective_target_vect_no_max: returning $et_vect_no_max_saved" 2
-    return $et_vect_no_max_saved
+    verbose "check_effective_target_vect_no_int_max: returning $et_vect_no_int_max_saved" 2
+    return $et_vect_no_int_max_saved
+}
+
+# Return 1 if the target plus current options does not support a vector
+# add instruction on "int", 0 otherwise.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_vect_no_int_add { } {
+    global et_vect_no_int_add_saved
+
+    if [info exists et_vect_no_int_add_saved] {
+	verbose "check_effective_target_vect_no_int_add: using cached result" 2
+    } else {
+	set et_vect_no_int_add_saved 0
+	# Alpha only supports vector add on V8QI and V4HI.
+	if { [istarget alpha*-*-*] } {
+	    set et_vect_no_int_add_saved 1
+	}
+    }
+    verbose "check_effective_target_vect_no_int_add: returning $et_vect_no_int_add_saved" 2
+    return $et_vect_no_int_add_saved
 }
 
 # Return 1 if the target plus current options does not support vector


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