<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:benny.kra@gmail.com" title="Benjamin Kramer <benny.kra@gmail.com>"> <span class="fn">Benjamin Kramer</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Less efficient encoding of shl using direct object emission"
   href="https://llvm.org/bugs/show_bug.cgi?id=23098">bug 23098</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>benny.kra@gmail.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Less efficient encoding of shl using direct object emission"
   href="https://llvm.org/bugs/show_bug.cgi?id=23098#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Less efficient encoding of shl using direct object emission"
   href="https://llvm.org/bugs/show_bug.cgi?id=23098">bug 23098</a>
              from <span class="vcard"><a class="email" href="mailto:benny.kra@gmail.com" title="Benjamin Kramer <benny.kra@gmail.com>"> <span class="fn">Benjamin Kramer</span></a>
</span></b>
        <pre>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</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>