Commit 07ead779 by Uros Bizjak Committed by Uros Bizjak

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
parent 598848e4
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> 2008-03-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/26222 PR middle-end/26222
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
#include <stdlib.h> #include <stdlib.h>
#include "../../tree-vect.h" #include "../../tree-vect.h"
__attribute__ ((noinline)) __attribute__ ((noinline)) void
void interp_pitch(float *exc, float *interp, int pitch, int len) interp_pitch(float *exc, float *interp, int pitch, int len)
{ {
int i,k; int i,k;
int maxj; int maxj;
......
...@@ -39,7 +39,11 @@ global dg-do-what-default ...@@ -39,7 +39,11 @@ global dg-do-what-default
set save-dg-do-what-default ${dg-do-what-default} set save-dg-do-what-default ${dg-do-what-default}
lappend DEFAULT_VECTCFLAGS "-msse2" 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'. # Initialize `dg'.
dg-init dg-init
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "../../tree-vect.h" #include "../../tree-vect.h"
__attribute__ ((noinline)) void __attribute__ ((noinline)) void
interp_pitch(float *exc, float *interp, int pitch, int len) interp_pitch(float *exc, float *interp, int pitch, int len)
{ {
int i,k; int i,k;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "../../tree-vect.h" #include "../../tree-vect.h"
__attribute__ ((noinline)) void __attribute__ ((noinline)) void
interp_pitch(float *exc, float *interp, int pitch, int len) interp_pitch(float *exc, float *interp, int pitch, int len)
{ {
int i,k; int i,k;
......
...@@ -47,5 +47,5 @@ int main (void) ...@@ -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 "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" } } */ /* { dg-final { cleanup-tree-dump "vect" } } */
...@@ -40,7 +40,11 @@ global dg-do-what-default ...@@ -40,7 +40,11 @@ global dg-do-what-default
set save-dg-do-what-default ${dg-do-what-default} set save-dg-do-what-default ${dg-do-what-default}
lappend DEFAULT_VECTCFLAGS "-msse2" 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'. # Initialize `dg'.
dg-init dg-init
......
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O2 -msse2" } */ /* { dg-options "-O2 -msse2" } */
#include "sse2-check.h"
#include <xmmintrin.h> #include <xmmintrin.h>
extern void abort(); extern void abort();
int untrue = 0; int untrue = 0;
...@@ -18,7 +19,8 @@ __v4sf setupa () __attribute((noinline)); ...@@ -18,7 +19,8 @@ __v4sf setupa () __attribute((noinline));
__v4sf setupa () { __v4sf t = { 1.0, 2.0, 3.0, 4.0 }; return t; } __v4sf setupa () { __v4sf t = { 1.0, 2.0, 3.0, 4.0 }; return t; }
__v4sf setupb () __attribute((noinline)); __v4sf setupb () __attribute((noinline));
__v4sf setupb () { __v4sf t = { 5.0, 6.0, 7.0, 8.0 }; return t; } __v4sf setupb () { __v4sf t = { 5.0, 6.0, 7.0, 8.0 }; return t; }
main() { void __attribute__((noinline))
sse2_test(void) {
u a, b; u a, b;
a.v = setupa (); a.v = setupa ();
b.v = setupb (); b.v = setupb ();
...@@ -26,5 +28,4 @@ main() { ...@@ -26,5 +28,4 @@ main() {
bar(a.v, b.v); bar(a.v, b.v);
b.v = (__v4sf) _mm_movehl_ps ((__m128)a.v, (__m128)b.v); b.v = (__v4sf) _mm_movehl_ps ((__m128)a.v, (__m128)b.v);
foo (a, b); foo (a, b);
return 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment