<html>
    <head>
      <base href="https://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 --- - Improve *_EXTEND_VECTOR_INREG codegen for illegal types"
   href="https://llvm.org/bugs/show_bug.cgi?id=30635">30635</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Improve *_EXTEND_VECTOR_INREG codegen for illegal types
          </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>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>llvm-dev@redking.me.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mkuper@google.com, pirama@google.com, spatel+llvm@rotateright.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre><a href="https://reviews.llvm.org/D25268">https://reviews.llvm.org/D25268</a> fixed integer promotion but the codegen is
still pretty nasty - there is no need for us to vectorize in this case, we
should just call movzbl/movsbl load+ext:

define <3 x i16> @zext_i8(<3 x i8>) {
  %2 = zext <3 x i8> %0 to <3 x i16>
  ret <3 x i16> %2
}

zext_i8:
  vpxor        %xmm0, %xmm0, %xmm0
  vpinsrb    $0, 4(%esp), %xmm0, %xmm0
  vpinsrb    $4, 8(%esp), %xmm0, %xmm0
  vpinsrb    $8, 12(%esp), %xmm0, %xmm0
  vmovd        %xmm0, %eax
  vpextrw    $2, %xmm0, %edx
  vpextrw    $4, %xmm0, %ecx
  retl

define <3 x i16> @sext_i8(<3 x i8>) {
  %2 = sext <3 x i8> %0 to <3 x i16>
  ret <3 x i16> %2
}

sext_i8:
  vpinsrb    $0, 4(%esp), %xmm0, %xmm0
  vpinsrb    $4, 8(%esp), %xmm0, %xmm0
  vpinsrb    $8, 12(%esp), %xmm0, %xmm0
  vpslld    $24, %xmm0, %xmm0
  vpsrad    $24, %xmm0, %xmm0
  vmovd        %xmm0, %eax
  vpextrw    $2, %xmm0, %edx
  vpextrw    $4, %xmm0, %ecx
  retl</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>