public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/7396: ix86: cmpgt_ss, cmpge_ss, cmpngt_ss, and cmpnge_ss SSE intriniscs are broken
@ 2002-07-24 12:16 aj
0 siblings, 0 replies; 3+ messages in thread
From: aj @ 2002-07-24 12:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 7396
>Category: target
>Synopsis: ix86: cmpgt_ss, cmpge_ss, cmpngt_ss, and cmpnge_ss SSE intriniscs are broken
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Wed Jul 24 12:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Andreas Jaeger
>Release: GCC 3.1, GCC 3.2 CVS
>Organization:
>Environment:
i686-linux-gnu
>Description:
The cmpgt_ss (and also the others) intrinsic copies the value
from the wrong argument. The example program outputs:
$ ./a.out
Return values: -1 6.000000 2.000000 1.000000
Aborted
but the correct value is:
-1 3.000000 4.000000 1.000000
The last three values should come from m1.
Btw. cmplt_ss works correctly, but it seems that the arguments are switched in the intrinsic.
>How-To-Repeat:
#include <xmmintrin.h>
#include <stdlib.h>
#include <stdio.h>
typedef union
{
__m128 m;
float f[4];
double d[2];
int i[4];
} munion;
int
test_it (void)
{
__m128 m1, m2;
munion res;
m1 = _mm_set_ps (1.0f, 4.0f, 3.0f, 8.0f);
m2 = _mm_set_ps (1.0f, 2.0f, 6.0f, 4.0f);
res.m = _mm_cmpgt_ss (m1, m2);
printf ("Return values: %d %f %f %f\n",
res.i[0], res.f[1], res.f[2], res.f[3]);
if (res.i[0] != -1)
abort ();
if (res.f[1] != 3.0f)
abort ();
if (res.f[2] != 4.0f)
abort ();
if (res.f[3] != 1.0f)
abort ();
return 0;
}
int
main (void)
{
return test_it ();
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: target/7396: ix86: cmpgt_ss, cmpge_ss, cmpngt_ss, and cmpnge_ss SSE intriniscs are broken
@ 2002-10-16 10:30 hubicka
0 siblings, 0 replies; 3+ messages in thread
From: hubicka @ 2002-10-16 10:30 UTC (permalink / raw)
To: aj, gcc-bugs, gcc-prs, hubicka
Synopsis: ix86: cmpgt_ss, cmpge_ss, cmpngt_ss, and cmpnge_ss SSE intriniscs are broken
State-Changed-From-To: open->closed
State-Changed-By: hubicka
State-Changed-When: Wed Oct 16 10:30:50 2002
State-Changed-Why:
* i386.c (builtin_description):Drop cmpg[te]s[sd].
* xmmintrin.h (__mm_cmpg[te]_s[sd]): Rewrite using
swapped alternative.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7396
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: target/7396: ix86: cmpgt_ss, cmpge_ss, cmpngt_ss, and cmpnge_ss SSE intriniscs are broken
@ 2002-10-15 13:14 hubicka
0 siblings, 0 replies; 3+ messages in thread
From: hubicka @ 2002-10-15 13:14 UTC (permalink / raw)
To: aj, gcc-bugs, gcc-prs, hubicka, nobody
Synopsis: ix86: cmpgt_ss, cmpge_ss, cmpngt_ss, and cmpnge_ss SSE intriniscs are broken
Responsible-Changed-From-To: unassigned->hubicka
Responsible-Changed-By: hubicka
Responsible-Changed-When: Tue Oct 15 13:14:39 2002
Responsible-Changed-Why:
mine.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7396
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-10-16 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-24 12:16 target/7396: ix86: cmpgt_ss, cmpge_ss, cmpngt_ss, and cmpnge_ss SSE intriniscs are broken aj
2002-10-15 13:14 hubicka
2002-10-16 10:30 hubicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).