public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/37158]  New:  Wrong insn for _mm_comieq_sd
@ 2008-08-19  5:13 hjl dot tools at gmail dot com
  2008-08-19  8:20 ` [Bug target/37158] " Joey dot ye at intel dot com
  0 siblings, 1 reply; 2+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-08-19  5:13 UTC (permalink / raw)
  To: gcc-bugs

[hjl@gnu-6 i386]$ cat x.c
/* { dg-do run } */
/* { dg-options "-O2 -msse2" } */

#include <emmintrin.h>

int
test (__m128d s1, __m128d s2)
{
  return _mm_comieq_sd (s1, s2);
}
[hjl@gnu-6 i386]$ ./usr/gcc-4.4/bin/gcc -S -O2 x.c
[hjl@gnu-6 i386]$ cat x.s
        .file   "x.c"
        .text
        .p2align 4,,15
.globl test
        .type   test, @function
test:
.LFB518:
        xorl    %eax, %eax
        ucomisd %xmm1, %xmm0
        sete    %al
        ret

It should be "comisd %xmm1, %xmm0".


-- 
           Summary:  Wrong insn for _mm_comieq_sd
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37158


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/37158] Wrong insn for _mm_comieq_sd
  2008-08-19  5:13 [Bug target/37158] New: Wrong insn for _mm_comieq_sd hjl dot tools at gmail dot com
@ 2008-08-19  8:20 ` Joey dot ye at intel dot com
  0 siblings, 0 replies; 2+ messages in thread
From: Joey dot ye at intel dot com @ 2008-08-19  8:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from Joey dot ye at intel dot com  2008-08-19 08:19 -------
Check out such code in i386.c:
/* Figure out whether to use ordered or unordered fp comparisons.
   Return the appropriate mode to use.  */

enum machine_mode
ix86_fp_compare_mode (enum rtx_code code ATTRIBUTE_UNUSED)
{
  /* ??? In order to make all comparisons reversible, we do all comparisons
     non-trapping when compiling for IEEE.  Once gcc is able to distinguish
     all forms trapping and nontrapping comparisons, we can make inequality
     comparisons trapping again, since it results in better code when using
     FCOM based compares.  */
  return TARGET_IEEE_FP ? CCFPUmode : CCFPmode;
}


-- 

Joey dot ye at intel dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary| Wrong insn for             |Wrong insn for _mm_comieq_sd
                   |_mm_comieq_sd               |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37158


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-19  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-19  5:13 [Bug target/37158] New: Wrong insn for _mm_comieq_sd hjl dot tools at gmail dot com
2008-08-19  8:20 ` [Bug target/37158] " Joey dot ye at intel dot com

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).