<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - New vector shuffle lowering misses to use movhps"
   href="http://llvm.org/bugs/show_bug.cgi?id=21140">21140</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>New vector shuffle lowering misses to use movhps
          </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>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </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>qcolombet@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13124" name="attach_13124" title="IR to reproduce the problem.">attachment 13124</a> <a href="attachment.cgi?id=13124&action=edit" title="IR to reproduce the problem.">[details]</a></span>
IR to reproduce the problem.

With the attach IR, the new vector shuffle lowering generates a movq followed
by a shufps instead of the direct movhps.

To reproduce:
llc -x86-experimental-vector-shuffle-lowering=true none_shufps_movhps.ll -o
new.s
llc -x86-experimental-vector-shuffle-lowering=false none_shufps_movhps.ll -o
old.s

diff -U 10 old.s new.s
 _foo:                                   ## @foo
     .cfi_startproc
 ## BB#0:
     movq    (%rsi), %xmm0
-    movhps    (%rdi), %xmm0
+    movq    (%rdi), %xmm1
+    shufps    $68, %xmm1, %xmm0       ## xmm0 = xmm0[0,1],xmm1[0,1]
     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>