<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 --- - IRCE breaks simplified of loops"
   href="https://llvm.org/bugs/show_bug.cgi?id=28764">28764</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>IRCE breaks simplified of loops
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Loop Optimizer
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>michael.v.zolotukhin@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=16833" name="attach_16833" title="Patch for enabling verification in loop-simplify">attachment 16833</a> <a href="attachment.cgi?id=16833&action=edit" title="Patch for enabling verification in loop-simplify">[details]</a></span>
Patch for enabling verification in loop-simplify

IRCE seems to break simplified form of loops, i.e. after it loops might be
missing a preheader or their exits might be not dedicated (i.e. exits have a
predecessors outside the loop).

That (along with some other problems) stops us from enabling loop-simplify
verification in the pass pipeline.

To reproduce the issue apply the attached patch (it enables verification in
loop-simplify) and then run 'ninja check'. I get the following failures:

Failing Tests (8):
    LLVM :: Transforms/IRCE/conjunctive-checks.ll
    LLVM :: Transforms/IRCE/decrementing-loop.ll
    LLVM :: Transforms/IRCE/multiple-access-no-preloop.ll
    LLVM :: Transforms/IRCE/only-upper-check.ll
    LLVM :: Transforms/IRCE/single-access-no-preloop.ll
    LLVM :: Transforms/IRCE/single-access-with-preloop.ll
    LLVM :: Transforms/IRCE/skip-profitability-checks.ll
    LLVM :: Transforms/IRCE/with-parent-loops.ll</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>