[LLVMbugs] [Bug 15487] clang emits unnecessary vinsertf128 and vextractf128

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 25 16:56:27 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=15487

Sanjay Patel <spatel+llvm at rotateright.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |spatel+llvm at rotateright.com
         Resolution|---                         |FIXED

--- Comment #1 from Sanjay Patel <spatel+llvm at rotateright.com> ---
I think we now produce the ideal codegen for your test case using clang built
from r233098. Sorry, but I can't cite specific commits that account for the
improvements:

$ ./clang -O2 -mavx 15487.c -o - -S -fomit-frame-pointer
...
        movq    _DATA at GOTPCREL(%rip), %rax
    vmovups    (%rax), %ymm0
    vmovups    4(%rax), %ymm1
    vextractf128    $1, %ymm0, %xmm2
    vextractf128    $1, %ymm1, %xmm3
    vpaddd    %xmm1, %xmm1, %xmm1
    vpaddd    %xmm0, %xmm1, %xmm0
    vpaddd    %xmm3, %xmm3, %xmm1
    vpaddd    %xmm2, %xmm1, %xmm1
    vinsertf128    $1, %xmm1, %ymm0, %ymm0
    vmovups    %ymm0, (%rax)
    vzeroupper
    retq


Feel free to reopen if you disagree

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150325/a472fdfc/attachment.html>


More information about the llvm-bugs mailing list