sse-17.c: Include sse2-check.h.
authorUros Bizjak <ubizjak@gmail.com>
Tue, 25 Mar 2008 08:02:14 +0000 (09:02 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 25 Mar 2008 08:02:14 +0000 (09:02 +0100)
* gcc.target/i386/sse-17.c: Include sse2-check.h.
(main): Change to void and rename to sse2_test.
* gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp: Set
dg-do-what-default to "compile" if SSE2 hardware is not available.
* gcc.dg/vect/costmodel/i386/x86_64-costmodel-vect.exp: Ditto.
* gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c: Remove
xfail vect_no_int_max from "vectorization not profitable" check.

From-SVN: r133504

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c
gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp
gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c
gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c
gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c
gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp
gcc/testsuite/gcc.target/i386/sse-17.c

index 942600c..68ba56b 100644 (file)
@@ -1,3 +1,13 @@
+2008-03-25  Uros Bizjak  <ubizjak@gmail.com>
+
+       * gcc.target/i386/sse-17.c: Include sse2-check.h.
+       (main): Change to void and rename to sse2_test.
+       * gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp: Set
+       dg-do-what-default to "compile" if SSE2 hardware is not available.
+       * gcc.dg/vect/costmodel/i386/x86_64-costmodel-vect.exp: Ditto.
+       * gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c: Remove
+       xfail vect_no_int_max from "vectorization not profitable" check.
+
 2008-03-24  Andrew Pinski  <andrew_pinski@playstation.sony.com>
 
        PR middle-end/26222
index 2766ced..5627c26 100644 (file)
@@ -3,8 +3,8 @@
 #include <stdlib.h>
 #include "../../tree-vect.h"
 
-__attribute__ ((noinline))
-void interp_pitch(float *exc, float *interp, int pitch, int len)
+__attribute__ ((noinline)) void
+interp_pitch(float *exc, float *interp, int pitch, int len)
 {
    int i,k;
    int maxj;
index 4ffdf99..dbf3b03 100644 (file)
@@ -39,7 +39,11 @@ global dg-do-what-default
 set save-dg-do-what-default ${dg-do-what-default}
 
 lappend DEFAULT_VECTCFLAGS "-msse2"
-set dg-do-what-default run
+if [check_sse2_hw_available] {
+    set dg-do-what-default run
+} else {
+    set dg-do-what-default compile
+}
 
 # Initialize `dg'.
 dg-init
index 9a9f97e..00e631b 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdlib.h>
 #include "../../tree-vect.h"
 
-__attribute__ ((noinline)) void 
+__attribute__ ((noinline)) void
 interp_pitch(float *exc, float *interp, int pitch, int len)
 {
    int i,k;
index 0bc09f6..5627c26 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdlib.h>
 #include "../../tree-vect.h"
 
-__attribute__ ((noinline)) void 
+__attribute__ ((noinline)) void
 interp_pitch(float *exc, float *interp, int pitch, int len)
 {
    int i,k;
index 436dff1..55334fd 100644 (file)
@@ -47,5 +47,5 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */
-/* { dg-final { scan-tree-dump-times "vectorization not profitable" 0 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorization not profitable" 0 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index ce970ae..66587e1 100644 (file)
@@ -40,7 +40,11 @@ global dg-do-what-default
 set save-dg-do-what-default ${dg-do-what-default}
 
 lappend DEFAULT_VECTCFLAGS "-msse2"
-set dg-do-what-default run
+if [check_sse2_hw_available] {
+    set dg-do-what-default run
+} else {
+    set dg-do-what-default compile
+}
 
 # Initialize `dg'.
 dg-init
index fc75f64..f7b3d0d 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -msse2" } */
+#include "sse2-check.h"
 #include <xmmintrin.h>
 extern void abort();
 int untrue = 0;
@@ -18,7 +19,8 @@ __v4sf setupa () __attribute((noinline));
 __v4sf setupa () { __v4sf t = { 1.0, 2.0, 3.0, 4.0 }; return t; }
 __v4sf setupb () __attribute((noinline));
 __v4sf setupb () { __v4sf t = { 5.0, 6.0, 7.0, 8.0 }; return t; }
-main() {
+void __attribute__((noinline))
+sse2_test(void) {
   u a, b;
   a.v = setupa ();
   b.v = setupb ();
@@ -26,5 +28,4 @@ main() {
     bar(a.v, b.v);
   b.v = (__v4sf) _mm_movehl_ps ((__m128)a.v, (__m128)b.v);
   foo (a, b);
-  return 0;
 }