From 07ead779be0eb41130c2b658ef98d6388745fab6 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 25 Mar 2008 09:02:14 +0100 Subject: [PATCH] sse-17.c: Include sse2-check.h. * 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 | 10 ++++++++++ .../costmodel/i386/costmodel-fast-math-vect-pr29925.c | 4 ++-- .../gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp | 6 +++++- .../costmodel/spu/costmodel-fast-math-vect-pr29925.c | 2 +- .../x86_64/costmodel-fast-math-vect-pr29925.c | 2 +- .../vect/costmodel/x86_64/costmodel-vect-reduc-1char.c | 2 +- .../vect/costmodel/x86_64/x86_64-costmodel-vect.exp | 6 +++++- gcc/testsuite/gcc.target/i386/sse-17.c | 5 +++-- 8 files changed, 28 insertions(+), 9 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 942600c9a10..68ba56bb446 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2008-03-25 Uros Bizjak + + * 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 PR middle-end/26222 diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c b/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c index 2766ced2871..5627c265523 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c +++ b/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c @@ -3,8 +3,8 @@ #include #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; diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp index 4ffdf99c446..dbf3b035d8e 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp +++ b/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp @@ -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 diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c b/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c index 9a9f97e802b..00e631b1366 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c +++ b/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c @@ -3,7 +3,7 @@ #include #include "../../tree-vect.h" -__attribute__ ((noinline)) void +__attribute__ ((noinline)) void interp_pitch(float *exc, float *interp, int pitch, int len) { int i,k; diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c index 0bc09f6da32..5627c265523 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c +++ b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c @@ -3,7 +3,7 @@ #include #include "../../tree-vect.h" -__attribute__ ((noinline)) void +__attribute__ ((noinline)) void interp_pitch(float *exc, float *interp, int pitch, int len) { int i,k; diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c index 436dff16eb0..55334fdd20d 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c +++ b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp index ce970ae1752..66587e10905 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp +++ b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/sse-17.c b/gcc/testsuite/gcc.target/i386/sse-17.c index fc75f64ec5a..f7b3d0d1c27 100644 --- a/gcc/testsuite/gcc.target/i386/sse-17.c +++ b/gcc/testsuite/gcc.target/i386/sse-17.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2 -msse2" } */ +#include "sse2-check.h" #include 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; } -- 2.30.2