This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix PR target/19240


tbp wrote:

BTW: As it is claimed by reporter, mixing 387 and SSE code can introduce
~15% slowdown for FP intensive code. I would like to point on similar
problem with FP compares


The reporter is back to nominal performance with this patch ;) Thanks a lot.


Great :)

Now i'd also like to point to SSE & FP compares but i'm unsure
http://gcc.gnu.org/ml/gcc-patches/2005-01/msg00168.html address that
too (as far as i grok it, it deals with NaNs an issue i had to
struggle with and triggered
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18944).



The patch for PR17767 also fixes your testcase for PR18944:

gcc -O2 -msse2 -mfpmath=sse pr18944.c

       pushl   %ebp
       movl    %esp, %ebp
       subl    $24, %esp
       movss   .LC0, %xmm0
       andl    $-16, %esp
       subl    $16, %esp
       divss   .LC1, %xmm0
       movss   %xmm0, -4(%ebp)
       movss   -4(%ebp), %xmm0
       shufps  $0, %xmm0, %xmm0
       cmpunordps      %xmm0, %xmm0
       call    ffg
       leave
       ret

However, I don't know what kind of joy gcc gets from moving %xmm0 to memory and back before shufps insn.

Case in point:
401447: fldz [snip lots of SSE only operations]
401535: movss %xmm2,0xc(%esp)
40153b: flds 0xc(%esp)
40153f: fcomip %st(1),%st
401541: jbe 401650


Feel free to clue me :)


Hm, yes, I think this is another case of TARGET_SSE_MATH problems.

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]