Summary: | movd support for _mm_cvtsi32_si64 and _mm_cvtsi64_si32 | ||
---|---|---|---|
Product: | gcc | Reporter: | dean |
Component: | target | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | gcc-bugs |
Priority: | P2 | Keywords: | missed-optimization, ssemmx |
Version: | 3.4.0 | ||
Target Milestone: | 4.0.0 | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu |
Build: | i686-pc-linux-gnu | Known to work: | |
Known to fail: | Last reconfirmed: | 2004-08-20 06:58:11 |
Description
dean
2003-07-22 04:17:08 UTC
Could you send you patch to gcc-patches@gcc.gnu.org after reading <http://gcc.gnu.org/contribute.html>. I can confirm his way is much faster. Subject: Re: movd support for _mm_cvtsi32_si64 and
_mm_cvtsi64_si32
On Tue, 22 Jul 2003, pinskia at physics dot uc dot edu wrote:
> Could you send you patch to gcc-patches@gcc.gnu.org after reading
> <http://gcc.gnu.org/contribute.html>.
i sent the patch there months ago and got no response.
-dean
Indeed 8871 is about fixing the 64-bit casting to use movd. I think this bug should be marked as a duplicate. (Ading extra builtins to work around the broken patterns for casting, which it sounds like what this patch does, is, IMO, not a good idea.) Subject: Re: movd support for _mm_cvtsi32_si64 and
_mm_cvtsi64_si32
On Wed, 23 Jul 2003, otaylor at redhat dot com wrote:
> (Ading extra builtins to work around the broken patterns for
> casting, which it sounds like what this patch does, is, IMO,
> not a good idea.)
i agree! thanks :) i just took the wussy approach 'cause i don't know
enough gcc to do the right appraoch.
-dean
The patch which fixed PR 8871 did not fix old_64_to_32. So reopening bug. 'gcc -O -march=pentium4 -fomit-frame-pointer -S t32.c' now produces: .file "t32.c" .text .globl old_64_to_32 .type old_64_to_32, @function old_64_to_32: subl $12, %esp movq %mm0, (%esp) movl (%esp), %eax addl $12, %esp ret .size old_64_to_32, .-old_64_to_32 .globl new_64_to_32 .type new_64_to_32, @function new_64_to_32: subl $12, %esp movq %mm0, (%esp) movl (%esp), %eax addl $12, %esp ret .size new_64_to_32, .-new_64_to_32 .globl old_32_to_64 .type old_32_to_64, @function old_32_to_64: movl 4(%esp), %eax movd 8(%esp), %mm0 movq %mm0, (%eax) ret $4 .size old_32_to_64, .-old_32_to_64 .globl new_32_to_64 .type new_32_to_64, @function new_32_to_64: movl 4(%esp), %eax movd 8(%esp), %mm0 movq %mm0, (%eax) ret $4 .size new_32_to_64, .-new_32_to_64 .ident "GCC: (GNU) 4.0.0 20041130 (experimental)" .section .note.GNU-stack,"",@progbits new_* and old_* functions produce the same code. Fixed on mainline. |