[LLVMbugs] [Bug 23098] Less efficient encoding of shl using direct object emission

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 1 12:09:30 PDT 2015


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

Benjamin Kramer <benny.kra at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |benny.kra at gmail.com
         Resolution|---                         |FIXED

--- Comment #1 from Benjamin Kramer <benny.kra at gmail.com> ---
This is not really an assembler problem, we were emitting a suboptimal
instruction from the instruction selector. That is fixed in r233832, we're now
emitting an addl which as small as the smaller version of shl but has higher
throughput on some microarchs.

$ clang -c test.c -O3 -o test.o && objdump -d test.o

test.o:     file format elf64-x86-64


Disassembly of section .text:

0000000000000000 <fn1>:
   0:   8b 05 00 00 00 00       mov    0x0(%rip),%eax        # 6 <fn1+0x6>
   6:   83 e0 7f                and    $0x7f,%eax
   9:   01 c0                   add    %eax,%eax
   b:   89 05 00 00 00 00       mov    %eax,0x0(%rip)        # 11 <fn1+0x11>
  11:   c3                      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/20150401/f456ff7a/attachment.html>


More information about the llvm-bugs mailing list