------- Comment #1 from rguenth at gcc dot gnu dot org  2007-07-10 09:14 -------
Fixed testcase:

#include <emmintrin.h>
__m128i int2vector(int i) { return _mm_cvtsi32_si128(i); }
int vector2int(__m128i i) { return _mm_cvtsi128_si32(i); }
__m128i long2vector(long long i) { return _mm_cvtsi64x_si128(i); }
long long vector2long(__m128i i) { return _mm_cvtsi128_si64x(i); }

mainline generates:

int2vector:
.LFB525:
        pxor    %xmm0, %xmm0
        movq    %rdi, -8(%rsp)
        movq    -8(%rsp), %xmm1
        movss   %xmm1, %xmm0
        ret
.LFE525:
        .size   int2vector, .-int2vector
        .p2align 4,,15
.globl long2vector
        .type   long2vector, @function
long2vector:
.LFB527:
        movq    %rdi, -8(%rsp)
        movq    -8(%rsp), %mm0
        movq2dq %mm0, %xmm0
        ret
.LFE527:
        .size   long2vector, .-long2vector
        .p2align 4,,15
.globl vector2long
        .type   vector2long, @function
vector2long:
.LFB528:
        movq    %xmm0, -16(%rsp)
        movq    -16(%rsp), %rax
        ret
.LFE528:
        .size   vector2long, .-vector2long
        .p2align 4,,15
.globl vector2int
        .type   vector2int, @function
vector2int:
.LFB526:
        movd    %xmm0, -12(%rsp)
        movl    -12(%rsp), %eax
        ret


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2007-07-10 09:14:14
               date|                            |


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

Reply via email to