<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 - Assertion `OuterLoop->isLCSSAForm(*DT) && "Outer loop not left in LCSSA form after loop interchange!"' failed"
   href="https://bugs.llvm.org/show_bug.cgi?id=45743">45743</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `OuterLoop->isLCSSAForm(*DT) && "Outer loop not left in LCSSA form after loop interchange!"' failed
          </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>Loop Optimizer
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>balarishi.bhogadi@amd.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The below issue was introduced in trunk in March 2nd week.

$ cat foo.c
int a, c, d, e;
int b[2][10];
void fn1() {
  for (; c; c++) {
    e = 0;
    for (; e; e++)
      ;
    d = 5;
    for (; d; d--)
      a |= b[d][c + 9];
  }
}


$ clang -c -O2 -mllvm -enable-loopinterchange foo.c
clang:
/home/llvm-trunk/llvm-project/llvm/lib/Transforms/Scalar/LoopInterchange.cpp:586:
bool {anonymous}::LoopInterchange::processLoop({anonymous}::LoopVector,
unsigned int, unsigned int, llvm::BasicBlock*, std::vector<std::vector<char,
std::allocator<char> > >&): Assertion `OuterLoop->isLCSSAForm(*DT) && "Outer
loop not left in LCSSA form after loop interchange!"' failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /home/llvm-trunk/bin/clang -c -O2 -mllvm
-enable-loopinterchange foo.c
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module 'foo.c'.
4.      Running pass 'Loop Pass Manager' on function '@fn1'
5.      Running pass 'Interchanges loops for cache reuse' on basic block
'%for.cond1.preheader'
...
...
...</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>