[LLVMbugs] [Bug 19315] New: scalar evolution crashes on function with many loops

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 2 16:38:07 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19315

            Bug ID: 19315
           Summary: scalar evolution crashes on function with many loops
           Product: new-bugs
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: skye at cloudera.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12327
  --> http://llvm.org/bugs/attachment.cgi?id=12327&action=edit
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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140402/8e98c92a/attachment.html>


More information about the llvm-bugs mailing list