[LLVMdev] Code Extractor Issue
Ben Mayne
bmayne at 21technologies.com
Fri Feb 1 12:03:13 PST 2008
I'm having an issue with the CodeExtractor. When I try to extract the lone basic block from the following function, I get an assertion error.
define i32 @test(i32 %x) {
%tmp = call i32 @test3( i32 %x ) ; <i32> [#uses=1]
ret i32 %tmp
}
The assertion error is:
lli: Dominators.cpp:71: void llvm::DominatorTree::splitBlock(llvm::BasicBlock*): Assertion `NewBB->getTerminator()->getNumSuccessors() == 1 && "NewBB should have a single successor!"' failed.
lli((anonymous namespace)::PrintStackTrace()+0x22)[0x87f7cb8]
lli((anonymous namespace)::SignalHandler(int)+0x110)[0x87f7f7c]
/lib/tls/libc.so.6[0x59fa48]
/lib/tls/libc.so.6(abort+0x129)[0x5a1319]
/lib/tls/libc.so.6(__assert_fail+0x101)[0x598f41]
lli(llvm::DominatorTree::splitBlock(llvm::BasicBlock*)+0xb7)[0x874edff]
lli[0x86b2672]
lli[0x86b2b15]
lli(llvm::ExtractCodeRegion(llvm::DominatorTree&, std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > const&, bool)+0x39)[0x86b321d]
I just updated to llvm-2.1 from llvm-1.9 where I was never having this problem. I don't understand exactly what it's complaining about (maybe the fact that the terminator instruction is a 'ret' instruction?, but I don't see why it couldn't handle this kind of a block).
Thanks,
Ben Mayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080201/e4b0e519/attachment.html>
More information about the llvm-dev
mailing list