<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 - [InstCombine] We need to recursively enqueue users of instructions whose use-count changed"
   href="https://bugs.llvm.org/show_bug.cgi?id=47238">47238</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[InstCombine] We need to recursively enqueue users of instructions whose use-count changed
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Scalar Optimizations
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>lebedev.ri@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>And i think we've finally found a fundamental issue :S
<a href="https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20200817/821034.html">https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20200817/821034.html</a>

While so far we've managed to get out of all the extra iterations by
consistently
enqueueing all the operands to be revisited, i'm not sure it's really that
simple.

Here, we have basically the following:

%i0 = cmp with non-canonical pred
%i1 = not %i0
%i2 = some-op %i0

First time around, we don't manage to fold the %i1 (by flipping cmp predicate),
because %i0 has other uses, but manage to fold away %i2, reducing use count of
%i0.
We do enqueue %i0, but that does us no good, because we need to revisit %i1,
which we don't during this iteration.

So basically, not only do we need to enqueue the values whose use-count
changed,
we also need to recursively enqueue users of these instructions.</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>