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

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |target

--- Comment #24 from Drea Pinski <pinskia at gcc dot gnu.org> ---
.L30:
        movaps  xmm0, xmm2
        cmpltss xmm0, DWORD PTR [rdx]

        movaps  xmm1, xmm0
        andnps  xmm0, xmm3
        andps   xmm1, xmm4
        orps    xmm0, xmm1

        movss   DWORD PTR [rax-4], xmm0
        add     rdx, 4
        add     rax, 4
        cmp     r12, rdx
        jne     .L30

vs:
.LBB3_19:
        movss   xmm1, dword ptr [r14 + rcx]
        xor     edx, edx
        ucomiss xmm1, xmm0
        seta    dl
        movss   xmm1, dword ptr [rax + 4*rdx] // dl ? 0.8 : 1.0
        movss   dword ptr [r15 + rcx], xmm1
        add     rcx, 4
        cmp     rcx, 400000
        jne     .LBB3_19

Looks like this is only done for x86_64 without avx.

With avx you can use vblendvps instead.

.LBB3_19:
        vcmpltss        xmm3, xmm0, dword ptr [r14 + rax]
        vblendvps       xmm3, xmm2, xmm1, xmm3
        vmovss  dword ptr [r15 + rax], xmm3
        add     rax, 4
        cmp     rax, 400000
        jne     .LBB3_19


Seems like you could generate a V2SF memory location with the 2 constants and
load from that when you have a?CST1:CST2; if you don't have AVX.

Reply via email to