<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] Invalid code generated for shufflevector + extractelement"
   href="https://bugs.llvm.org/show_bug.cgi?id=43968">43968</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[X86] Invalid code generated for shufflevector + extractelement
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Keywords</th>
          <td>miscompilation
          </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>nunoplopes@sapo.pt
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>craig.topper@gmail.com, liuz@cs.utah.edu, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, regehr@cs.utah.edu, spatel+llvm@rotateright.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>define float @foo(i32 %a, float %in) {
  %1 = insertelement <4 x float> undef, float %in, i32 0
  %t6.i = shufflevector <4 x float> %1, <4 x float> undef, <4 x i32> <i32
undef, i32 0, i32 0, i32 0>
  %val = extractelement <4 x float> %t6.i, i32 1
  ret float %val
}


llc gives:
foo:                                    # @foo
        ret


It should return %in.

<a href="https://godbolt.org/z/Ej_CKQ">https://godbolt.org/z/Ej_CKQ</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>