<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 --- - shuffling instead of moving high element directly (x86)"
   href="http://llvm.org/bugs/show_bug.cgi?id=21791">21791</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>shuffling instead of moving high element directly (x86)
          </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>spatel+llvm@rotateright.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>In this test case, we want to store the high element of the vector:

$ cat get_high.ll 
define void @get_high(<2 x double> %v, double* %ptr) {
  %vecext1 = extractelement <2 x double> %v, i32 1
  store double %vecext1, double* %ptr, align 8
  ret void
}

With plain SSE2:
$ ./llc get_high.ll -o -
...
    shufpd    $1, %xmm0, %xmm0        ## xmm0 = xmm0[1,0]
    movlpd    %xmm0, (%rdi)
    retq

With AVX:
$ ./llc -mcpu=btver2 get_high.ll -o -
...
    vpermilpd    $1, %xmm0, %xmm0 ## xmm0 = xmm0[1,0]
    vmovlpd    %xmm0, (%rdi)
    retq

---------------------------------------------------------------------

I think we should be generating '(v)movhpd' instead; no shuffles needed.</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>