diff options
author | Dale Johannesen <dalej@apple.com> | 2005-12-22 19:06:09 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@gcc.gnu.org> | 2005-12-22 19:06:09 +0000 |
commit | 42101c23d5c364cd509d8024853e342e4317027d (patch) | |
tree | 83fe8661832918aed388eec3810b8fe6c6469055 /gcc | |
parent | 19b68a48afcec88625ca82b2edf641469a77ce02 (diff) | |
download | gcc-42101c23d5c364cd509d8024853e342e4317027d.zip gcc-42101c23d5c364cd509d8024853e342e4317027d.tar.gz gcc-42101c23d5c364cd509d8024853e342e4317027d.tar.bz2 |
sse.md (sse_movhlps): Reverse operands for 2nd and 3rd alternatives.
2005-12-22 Dale Johannesen <dalej@apple.com>
* config/i386/sse.md (sse_movhlps): Reverse operands for
2nd and 3rd alternatives.
2005-12-22 Dale Johannesen <dalej@apple.com>
* gcc.target/i386/sse-17.c: New.
From-SVN: r108966
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/sse.md | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/sse-17.c | 30 |
4 files changed, 43 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8004d01..8e265ab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-12-22 Dale Johannesen <dalej@apple.com> + + * config/i386/sse.md (sse_movhlps): Reverse operands for + 2nd and 3rd alternatives. + 2005-12-22 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/25513 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 8fc3da0..b444491 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -1044,8 +1044,8 @@ [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,x,m") (vec_select:V4SF (vec_concat:V8SF - (match_operand:V4SF 1 "nonimmediate_operand" " 0,o,x") - (match_operand:V4SF 2 "nonimmediate_operand" " x,0,0")) + (match_operand:V4SF 1 "nonimmediate_operand" " 0,0,0") + (match_operand:V4SF 2 "nonimmediate_operand" " x,o,x")) (parallel [(const_int 6) (const_int 7) (const_int 2) @@ -1053,8 +1053,8 @@ "TARGET_SSE && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "@ movhlps\t{%2, %0|%0, %2} - movlps\t{%H1, %0|%0, %H1} - movhps\t{%1, %0|%0, %1}" + movlps\t{%H2, %0|%0, %H2} + movhps\t{%2, %0|%0, %2}" [(set_attr "type" "ssemov") (set_attr "mode" "V4SF,V2SF,V2SF")]) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7bfb7cd..ebeb40a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-12-22 Dale Johannesen <dalej@apple.com> + + * gcc.target/i386/sse-17.c: New. + 2005-12-22 Paul Brook <paul@codesourcery.com> * gcc.dg/tree-ssa/loop-1.c: Look for jump/branch on m68k. diff --git a/gcc/testsuite/gcc.target/i386/sse-17.c b/gcc/testsuite/gcc.target/i386/sse-17.c new file mode 100644 index 0000000..86d22c4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/sse-17.c @@ -0,0 +1,30 @@ +/* { dg-do run { target i?86-*-* x86_64-*-* } } */ +/* { dg-options "-O2 -msse2" } */ +#include <xmmintrin.h> +extern void abort(); +int untrue = 0; +typedef union { + __v4sf v; + float f[4]; +} u; +void foo (u, u) __attribute__((noinline)); +void foo (u a, u b) { + if (b.f[0] != 7.0 || b.f[1] != 8.0 || b.f[2] != 3.0 || b.f[3] != 4.0) + abort(); +} +void bar (__v4sf, __v4sf) __attribute__((noinline)); +void bar (__v4sf a __attribute((unused)), __v4sf b __attribute((unused))) { untrue = 0;} +__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() { + u a, b; + a.v = setupa (); + b.v = setupb (); + if (untrue) + bar(a.v, b.v); + b.v = (__v4sf) _mm_movehl_ps ((__m128)a.v, (__m128)b.v); + foo (a, b); + return 0; +} |