<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 ISel gets stuck in infinite loop"
   href="https://bugs.llvm.org/show_bug.cgi?id=41066">41066</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>X86 ISel gets stuck in infinite loop
          </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>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>andrew@scheidecker.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=21595" name="attach_21595" title="IR that triggers bug">attachment 21595</a> <a href="attachment.cgi?id=21595&action=edit" title="IR that triggers bug">[details]</a></span>
IR that triggers bug

Using SVN revision 356146 (from 2019/03/14), llc gets stuck in a loop on the
attached input, when run with the command-line:

  llc llvm-lock2.ll -mcpu=skylake-avx512

Using llc from the LLVM 6.0 release does not get stuck in a loop.

Running it with e.g. -mcpu=skylake also does not get stuck in a loop. Based on
this, I've assumed this is an X86/AVX512 target specific bug.

Passing -debug prints the following in a loop:

  Combining: t13: v2i64 = or t1518, t2

  Combining: t1518: v2i64 = vselect t1517, t11, t10
  Creating new node: t1519: v2i1 = xor t1517, t24
  Creating new node: t1520: v2i64 = vselect t1519, t10, t11
   ... into: t1520: v2i64 = vselect t1519, t10, t11

  Combining: t13: v2i64 = or t1520, t2

  Combining: t1520: v2i64 = vselect t1519, t10, t11
  Creating new node: t1521: v2i1 = xor t1519, t24
  Creating new node: t1522: v2i64 = vselect t1521, t11, t10
   ... into: t1522: v2i64 = vselect t1521, t11, t10</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>