[LLVMbugs] [Bug 2031] New: dominator frontier not updated correctly

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Feb 13 19:49:51 PST 2008


           Summary: dominator frontier not updated correctly
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Loop Optimizer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=1403)
 --> (http://llvm.org/bugs/attachment.cgi?id=1403)

One of these passes isn't updating the domfrontier properly and the problem is
manifesting itself as a crash in loop-unswitch.

$ opt -scalarrepl -loop-unswitch -break-crit-edges b.bc

opt: /usr/local/src/llvm/include/llvm/Analysis/Dominators.h:881: void
const, std::set<llvm::BasicBlock*, std::less<llvm::BasicBlock*>,
std::allocator<llvm::BasicBlock*> > > >, llvm::BasicBlock*): Assertion
`I->second.count(Node) && "Node is not in DominanceFrontier of BB"' failed.

Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x41e969a1 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0x41e982b9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0x41e8ff51 in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#4  0x08459777 in llvm::DominanceFrontierBase::removeFromFrontier (
    this=0x876c168, I={_M_node = 0x8772cc8}, Node=0x8770d08)
    at /usr/local/src/llvm/include/llvm/Analysis/Dominators.h:881
#5  0x084762c5 in (anonymous
namespace)::LoopUnswitch::UnswitchNontrivialCondition (this=0x876d190,
LIC=0x876e370, Val=0x87719d0, L=0x8771238)
    at LoopUnswitch.cpp:897
#6  0x08476990 in (anonymous namespace)::LoopUnswitch::UnswitchIfProfitable (
    this=0x876d190, LoopCond=0x876e370, Val=0x87719d0, L=0x8771238)
    at LoopUnswitch.cpp:433
#7  0x08476aa0 in (anonymous namespace)::LoopUnswitch::processLoop (
    this=0x876d190, L=0x8771238) at LoopUnswitch.cpp:215
#8  0x08476d6c in (anonymous namespace)::LoopUnswitch::runOnLoop (
    this=0x876d190, L=0x8771238, LPM_Ref=@0x876f818) at LoopUnswitch.cpp:191
#9  0x08541d60 in llvm::LPPassManager::runOnFunction (this=0x876f818, 
    F=@0x876d8b0) at LoopPass.cpp:225
#10 0x08610ad2 in llvm::FPPassManager::runOnFunction (this=0x876e8e8, 
    F=@0x876d8b0) at PassManager.cpp:1184
#11 0x08610c82 in llvm::FPPassManager::runOnModule (this=0x876e8e8, 
    M=@0x876bf98) at PassManager.cpp:1204
---Type <return> to continue, or q <return> to quit---
#12 0x0861079c in llvm::MPPassManager::runOnModule (this=0x876e3f0, 
    M=@0x876bf98) at PassManager.cpp:1254
#13 0x08610956 in llvm::PassManagerImpl::run (this=0x876c090, M=@0x876bf98)
    at PassManager.cpp:1328
#14 0x086109aa in llvm::PassManager::run (this=0xffffd60c, M=@0x876bf98)
    at PassManager.cpp:1360
#15 0x08364959 in main (argc=5, argv=0xffffd7f4) at opt.cpp:426

Testcase attached.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list