[LLVMbugs] [Bug 18737] Missed optimization is switch

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 4 08:59:36 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=18737

Hans Wennborg <hans at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Hans Wennborg <hans at chromium.org> ---
Thanks for updating the bug!

Yes, this got fixed by Erik in
http://llvm.org/viewvc/llvm-project?rev=222121&view=rev.

In 3.6 we generate:

    leal    -1(%rdi), %ecx
    xorl    %eax, %eax
    cmpl    $4, %ecx
    cmovbl    %edi, %eax
    retq

After http://llvm.org/viewvc/llvm-project/?view=rev&revision=227125, we also
exploit unreachable default cases, so with 3.7 the example above compiles to:

    movl    %edi, %eax
    retq

-- 
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/20150304/6ae903f7/attachment.html>


More information about the llvm-bugs mailing list