https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116274

--- Comment #6 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
(In reply to Hongtao Liu from comment #5)
> For non-avx case, looks like it hits here
> 
>   748  /* Special case TImode to 128-bit vector conversions via V2DI.  */   
> 


Prevent that in reload, we get

        .file   "test.c"
        .text
        .p2align 4
        .globl  testq
        .type   testq, @function
testq:
.LFB0:
        .cfi_startproc
        movq    %rdi, %xmm1
        pinsrq  $1, %rsi, %xmm1
        movdqa  %xmm1, %xmm0
        psrldq  $8, %xmm0
        paddq   %xmm1, %xmm0
        movq    %xmm0, %rax
        ret
        .cfi_endproc
.LFE0:
        .size   testq, .-testq
        .p2align 4
        .globl  testw
        .type   testw, @function
testw:
.LFB1:
        .cfi_startproc
        movq    %rdi, %xmm1
        pinsrq  $1, %rsi, %xmm1
        movdqa  %xmm1, %xmm0
        psrldq  $8, %xmm0
        paddw   %xmm1, %xmm0
        movdqa  %xmm0, %xmm1
        psrldq  $4, %xmm1
        paddw   %xmm1, %xmm0
        movdqa  %xmm0, %xmm1
        psrldq  $2, %xmm1
        paddw   %xmm1, %xmm0
        pextrw  $0, %xmm0, %eax
        ret
        .cfi_endproc
.LFE1:
        .size   testw, .-testw
        .p2align 4
        .globl  testd
        .type   testd, @function
testd:
.LFB2:
        .cfi_startproc
        movq    %rdi, %xmm1
        pinsrq  $1, %rsi, %xmm1
        movdqa  %xmm1, %xmm0
        psrldq  $8, %xmm0
        paddd   %xmm1, %xmm0
        movdqa  %xmm0, %xmm1
        psrldq  $4, %xmm1
        paddd   %xmm1, %xmm0
        movd    %xmm0, %eax
        ret
        .cfi_endproc
.LFE2:

Reply via email to