<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 - [DAGCombiner] crash when forming shuffle from build vector"
   href="https://bugs.llvm.org/show_bug.cgi?id=40394">40394</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[DAGCombiner] crash when forming shuffle from build vector
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Common Code Generator Code
          </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>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This will crash using llc built from trunk r351752:

target triple = "aarch64-unknown-linux-gnu"

define <4 x i32> @truncating_build_vector_crash(<4 x i16> %t0) {
  %t1 = extractelement <4 x i16> %t0, i32 2
  %vgetq_lane = zext i16 %t1 to i32
  %t2 = insertelement <4 x i32> undef, i32 %vgetq_lane, i64 0
  ret <4 x i32> %t2
}

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

The bug was introduced with:
<a href="https://reviews.llvm.org/D56281">https://reviews.llvm.org/D56281</a> / <a href="https://reviews.llvm.org/rL351198">https://reviews.llvm.org/rL351198</a>

I committed a fix that limits the transform to avoid the crash here:
<a href="https://reviews.llvm.org/rL351753">https://reviews.llvm.org/rL351753</a>

I think we should pull that commit into the 8.0 release to avoid the crash.</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>