[LLVMdev] InsertBranch called unconditionally?
Rafael EspĂndola
rafael.espindola at gmail.com
Tue Oct 24 09:26:23 PDT 2006
According to the docs, InsertBranch should only be called if
AnalyzeBranch returns success. But in targets (like ARM or Sparc) that
don't implement them, the following test fails:
-----------------------------------
void %__gcov_init() {
entry:
switch uint 0, label %cond_true.i [
uint 0, label %UnifiedReturnBlock
uint 875573313, label %gcov_version.exit
]
cond_true.i: ; preds = %entry
ret void
gcov_version.exit: ; preds = %entry
ret void
UnifiedReturnBlock: ; preds = %entry
ret void
}
---------------------------------------
The error is:
llc: /home/rafael/dev/llvm/cvs/include/llvm/Target/TargetInstrInfo.h:317:
virtual void llvm::TargetInstrInfo::InsertBranch(llvm::MachineBasicBlock&,
llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, const
std::vector<llvm::MachineOperand, std::allocator<llvm::MachineOperand>
>&) const: Assertion `0 && "Target didn't implement
TargetInstrInfo::InsertBranch!"' failed.
llc((anonymous namespace)::PrintStackTrace()+0x17)[0xc2f98f]
llc((anonymous namespace)::SignalHandler(int)+0x10e)[0xc2fbfc]
/lib/libc.so.6[0x2b59c5fb5110]
/lib/libc.so.6(gsignal+0x3b)[0x2b59c5fb507b]
/lib/libc.so.6(abort+0x10e)[0x2b59c5fb684e]
/lib/libc.so.6(__assert_fail+0x104)[0x2b59c5faeaf4]
llc[0x7d8149]
llc((anonymous namespace)::BranchFolder::ReplaceTailWithBranchTo(llvm::ilist_iterator<llvm::MachineInstr>,
llvm::MachineBasicBlock*)+0xe3)[0xab7ef9]
llc((anonymous namespace)::BranchFolder::TailMergeBlocks(llvm::MachineFunction&)+0x451)[0xab837b]
llc((anonymous namespace)::BranchFolder::runOnMachineFunction(llvm::MachineFunction&)+0x7d)[0xab872d]
Best Regards,
Rafael
More information about the llvm-dev
mailing list