<html>
    <head>
      <base href="http://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 --- - scalar evolution crashes on function with many loops"
   href="http://llvm.org/bugs/show_bug.cgi?id=19315">19315</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>scalar evolution crashes on function with many loops
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.3
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>skye@cloudera.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>Created <span class=""><a href="attachment.cgi?id=12327" name="attach_12327" title="repro">attachment 12327</a> <a href="attachment.cgi?id=12327&action=edit" title="repro">[details]</a></span>
repro

LLVM appears to be infinitely recursing (or at least recursing way too much) on
a function with 100s of inlined loops. I attached a small repro application.
When I run opt -O2 on the compiled program, I get the following stack snippet:

[...]
#16540 0x000000000147b340 in llvm::ScalarEvolution::createNodeForGEP
(this=0x358e2f0, GEP=0x35533a0) at ScalarEvolution.cpp:3183
#16541 0x0000000001479174 in llvm::ScalarEvolution::createSCEV (this=0x358e2f0,
V=0x35533a0) at ScalarEvolution.cpp:3824
#16542 0x0000000001477517 in llvm::ScalarEvolution::getSCEV (this=0x358e2f0,
V=0x35533a0) at ScalarEvolution.cpp:2725
#16543 0x000000000147ac9c in llvm::ScalarEvolution::createNodeForPHI
(this=0x358e2f0, PN=0x3547ec0) at ScalarEvolution.cpp:3074
#16544 0x0000000001479195 in llvm::ScalarEvolution::createSCEV (this=0x358e2f0,
V=0x3547ec0) at ScalarEvolution.cpp:3827
#16545 0x0000000001477517 in llvm::ScalarEvolution::getSCEV (this=0x358e2f0,
V=0x3547ec0) at ScalarEvolution.cpp:2725
#16546 0x000000000147b340 in llvm::ScalarEvolution::createNodeForGEP
(this=0x358e2f0, GEP=0x3550cd0) at ScalarEvolution.cpp:3183
#16547 0x0000000001479174 in llvm::ScalarEvolution::createSCEV (this=0x358e2f0,
V=0x3550cd0) at ScalarEvolution.cpp:3824
#16548 0x0000000001477517 in llvm::ScalarEvolution::getSCEV (this=0x358e2f0,
V=0x3550cd0) at ScalarEvolution.cpp:2725
#16549 0x000000000147ac9c in llvm::ScalarEvolution::createNodeForPHI
(this=0x358e2f0, PN=0x35452e0) at ScalarEvolution.cpp:3074
#16550 0x0000000001479195 in llvm::ScalarEvolution::createSCEV (this=0x358e2f0,
V=0x35452e0) at ScalarEvolution.cpp:3827
#16551 0x0000000001477517 in llvm::ScalarEvolution::getSCEV (this=0x358e2f0,
V=0x35452e0) at ScalarEvolution.cpp:2725
#16552 0x0000000001483422 in llvm::ScalarEvolution::computeSCEVAtScope
(this=0x358e2f0, V=0x359cbb0, L=0x35ae5f0) at ScalarEvolution.cpp:5186
#16553 0x000000000147f190 in llvm::ScalarEvolution::getSCEVAtScope
(this=0x358e2f0, V=0x359cbb0, L=0x35ae5f0) at ScalarEvolution.cpp:5041
#16554 0x0000000001483f36 in llvm::ScalarEvolution::computeSCEVAtScope
(this=0x358e2f0, V=0x359cbf0, L=0x35ae5f0) at ScalarEvolution.cpp:5309
#16555 0x000000000147f190 in llvm::ScalarEvolution::getSCEVAtScope
(this=0x358e2f0, V=0x359cbf0, L=0x35ae5f0) at ScalarEvolution.cpp:5041
#16556 0x0000000001483440 in llvm::ScalarEvolution::computeSCEVAtScope
(this=0x358e2f0, V=0x359cb10, L=0x35ae5f0) at ScalarEvolution.cpp:5187
#16557 0x000000000147f190 in llvm::ScalarEvolution::getSCEVAtScope
(this=0x358e2f0, V=0x359cb10, L=0x35ae5f0) at ScalarEvolution.cpp:5041
#16558 0x000000000147df68 in llvm::ScalarEvolution::ComputeExitLimitFromICmp
(this=0x358e2f0, L=0x35ae5f0, ExitCond=0x3548a40, TBB=0x354b6d0, FBB=0x354e490,
IsSubExpr=false) at ScalarEvolution.cpp:4538
#16559 0x000000000147dcb2 in llvm::ScalarEvolution::ComputeExitLimitFromCond
(this=0x358e2f0, L=0x35ae5f0, ExitCond=0x3548a40, TBB=0x354b6d0, FBB=0x354e490,
IsSubExpr=false) at ScalarEvolution.cpp:4489
#16560 0x000000000147d549 in llvm::ScalarEvolution::ComputeExitLimit
(this=0x358e2f0, L=0x35ae5f0, ExitingBlock=0x354e490) at
ScalarEvolution.cpp:4394
#16561 0x000000000147c6f5 in llvm::ScalarEvolution::ComputeBackedgeTakenCount
(this=0x358e2f0, L=0x35ae5f0) at ScalarEvolution.cpp:4307
#16562 0x000000000147bfb2 in llvm::ScalarEvolution::getBackedgeTakenInfo
(this=0x358e2f0, L=0x35ae5f0) at ScalarEvolution.cpp:4064
#16563 0x000000000147bd1f in llvm::ScalarEvolution::getBackedgeTakenCount
(this=0x358e2f0, L=0x35ae5f0) at ScalarEvolution.cpp:4027
#16564 0x000000000111fd60 in (anonymous namespace)::IndVarSimplify::runOnLoop
(this=0x358dda0, L=0x35ae5f0, LPM=...) at IndVarSimplify.cpp:1755
#16565 0x00000000013ec63a in llvm::LPPassManager::runOnFunction
(this=0x358ee70, F=...) at LoopPass.cpp:228
#16566 0x000000000170fa5b in llvm::FPPassManager::runOnFunction
(this=0x3586ac0, F=...) at PassManager.cpp:1530
#16567 0x00000000013429b2 in (anonymous namespace)::CGPassManager::RunPassOnSCC
(this=0x3585090, P=0x3586ac0, CurSCC=..., CG=...,
CallGraphUpToDate=@0x7fff1315b32e: true, DevirtualizedCall=@0x7fff1315b3cb:
false) at CallGraphSCCPass.cpp:148
#16568 0x0000000001342371 in (anonymous
namespace)::CGPassManager::RunAllPassesOnSCC (this=0x3585090, CurSCC=...,
CG=..., DevirtualizedCall=@0x7fff1315b3cb: false) at CallGraphSCCPass.cpp:404
#16569 0x0000000001341cc5 in (anonymous namespace)::CGPassManager::runOnModule
(this=0x3585090, M=...) at CallGraphSCCPass.cpp:460
#16570 0x000000000171016a in llvm::MPPassManager::runOnModule (this=0x3567ed0,
M=...) at PassManager.cpp:1608
#16571 0x000000000171091e in llvm::PassManagerImpl::run (this=0x3567be0, M=...)
at PassManager.cpp:1703
#16572 0x0000000001710b71 in llvm::PassManager::run (this=0x7fff1315ba40,
M=...) at PassManager.cpp:1738
#16573 0x0000000000657152 in main (argc=4, argv=0x7fff1315bc98) at opt.cpp:824</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>