Tracking down the "pred_iterator out of range" assert

I’ve finally been able to get back to a little hacking, and I’ve tracked down the before/after SVN revision numbers where this assert gets triggered:

47988: No assert
47989: Assert gets triggered during ‘make check’

This bug pops up when building Release from bootstrap on x86 Darwin (Mac OS X 10.4.11) using XCode 2.5’s gcc 4.0.1. I’ve looked at the diffs between the two revision numbers, but didn’t get very far. I’ll continue to investigate, but I’m sure there are other llvm developers who can find the problem somewhat faster.

-scooter

That's my patch.

Do you have steps to reproduce?

Nick

Scott Michel wrote:

That’s my patch.

Do you have steps to reproduce?

I just reproduced. I took a clean OS X 10.4 / Xcode (stable release i think) laptop, built llvm w/ the following commands:

$ ./configure --enable-optimized --enable-jit
$ make -j2
$ ./Release/bin/llvm-as < test/CodeGen/X86/loop-hoist.ll -o testcase.bc
$ ./Release/bin/llc testcase.bc
/Users/chandlerc/code/oss/llvm/include/llvm/Support/CFG.h:61: failed assertion `!It.atEnd() && “pred_iterator out of range!”’
fish: Process 19237, “Release/bin/llc” from job 1, “Release/bin/llvm-as < test/CodeGen/X86/loop-hoist.ll | Release/bin/llc > /dev/null” terminated by signal SIGABRT (Abort)

Here is a GDB backtrace. Feel free to ask me for any further information.
(gdb) bt
#0 0x9003d66c in kill ()
#1 0x9010e8cf in raise ()
#2 0x9010d422 in abort ()
#3 0x0054e4aa in __eprintf ()
#4 0x0044ae8e in llvm::isCriticalEdge ()
#5 0x0043d092 in (anonymous namespace)::CodeGenPrepare::OptimizeBlock ()
#6 0x0043dd24 in (anonymous namespace)::CodeGenPrepare::runOnFunction ()
#7 0x004f8163 in llvm::FPPassManager::runOnFunction ()
#8 0x004f874a in llvm::FunctionPassManagerImpl::run ()
#9 0x004f88a5 in llvm::FunctionPassManager::run ()
#10 0x000034da in main ()

-Chandler