<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [X86] Possibly incorrect throughput for vpshufb/vpperm on bdver2 model"
   href="https://bugs.llvm.org/show_bug.cgi?id=51539">51539</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[X86] Possibly incorrect throughput for vpshufb/vpperm on bdver2 model
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: X86
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>llvm-dev@redking.me.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>craig.topper@gmail.com, lebedev.ri@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, pengfei.wang@intel.com, spatel+llvm@rotateright.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I noticed this while working on the D103695 cost model helper script, the
llvm-mca reported bdver2 throughput for codegen containing vpshufb/vpperm is
often higher than expected. 

Instruction Info:
[1]: #uOps
[2]: Latency
[3]: RThroughput
[4]: MayLoad
[5]: MayStore
[6]: HasSideEffects (U)

[1]    [2]    [3]    [4]    [5]    [6]    Instructions:
 1      3     1.50                        vpshufb       %xmm0, %xmm1, %xmm2
 1      2     1.50                        vpperm        %xmm0, %xmm1, %xmm2,
%xmm3

<a href="https://llvm.godbolt.org/z/Tsc5P4zox">https://llvm.godbolt.org/z/Tsc5P4zox</a>

All the docs I can find (AMDFam15h SoG, Agner, instlatx64 etc) indicate these
are fastpath (tp = 1.0) but just on pipe1 (xbr):

<a href="https://www.amd.com/system/files/TechDocs/47414_15h_sw_opt_guide.pdf">https://www.amd.com/system/files/TechDocs/47414_15h_sw_opt_guide.pdf</a></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>