<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 --- - CodeGen crash with "Physical register dependency violated?""
   href="https://llvm.org/bugs/show_bug.cgi?id=23405">23405</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>CodeGen crash with "Physical register dependency violated?"
          </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>Linux
          </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>chfast@gmail.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>The CodeGen crashes during instruction scheduling / backtracking. It is quite
similar to <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - CodeGen crash with "Queue is empty!" on lshr i256 instruction"
   href="show_bug.cgi?id=22304">https://llvm.org/bugs/show_bug.cgi?id=22304</a> (already fixed).

Test case:

define i64 @test(i64 %a, i256 %b, i1 %c) {
  %u = zext i64 %a to i256
  %s = add i256 %u, 1
  %o = trunc i256 %s to i1
  %j = add i256 %s, 1
  %i = icmp ule i64 %a, 1
  %f = select i1 %o, i256 undef, i256 %j
  %d = select i1 %i, i256 %f, i256 1
  %e = add i256 %b, 1
  %n = select i1 %c, i256 %e, i256 %b
  %m = trunc i256 %n to i64
  %h = add i64 %m, 1
  %r = zext i64 %h to i256
  %v = lshr i256 %d, %r
  %t = trunc i256 %v to i1
  %q = shl i256 1, %r
  %p = and i256 %d, %q
  %w = icmp ule i256 %n, 1
  %y = select i1 %t, i256 undef, i256 %p
  %x = select i1 %w, i256 %y, i256 %d
  %z = trunc i256 %x to i64
  ret i64 %z
}</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>