View Single Post
Old 21 May 2015, 22:19   #101
nogginthenog
Amigan

 
Join Date: Feb 2012
Location: London
Posts: 493
Example of failure:

test2.c
Code:
int myfunc()
{
   return 0;
}

void test()
{
   int x = myfunc();
}
clang -emit-llvm test2.c -c -o test2.ll
(no O2 this time)

./llvm-m68k/build/bin/llc -march=m68k test2.ll
Code:
Not Implemented
UNREACHABLE executed at /home/paul/llvm-m68k/include/llvm/Target/TargetLowering.h:1376!
0  llc             0x00000000014fa902
1  llc             0x00000000014fa5d8
2  libpthread.so.0 0x00007f26764ae0a0
3  libc.so.6       0x00007f26759a7165 gsignal + 53
4  libc.so.6       0x00007f26759aa3e0 abort + 384
5  llc             0x00000000014c862b
6  llc             0x0000000000a3f612
7  llc             0x0000000000e7cb64 llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const + 2490
8  llc             0x0000000000e76176 llvm::SelectionDAGBuilder::LowerCallTo(llvm::ImmutableCallSite, llvm::SDValue, bool, llvm::MachineBasicBlock*) + 2638
9  llc             0x0000000000e77f79 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) + 2183
10 llc             0x0000000000e4e0a8 llvm::SelectionDAGBuilder::visit(unsigned int, llvm::User const&) + 1232
11 llc             0x0000000000e4db3a llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) + 128
12 llc             0x0000000000e9c244 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 68
13 llc             0x0000000000e9f083 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 2873
14 llc             0x0000000000e9b756 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 864
15 llc             0x0000000000a3dc73
16 llc             0x000000000103b365 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 95
17 llc             0x000000000140e271 llvm::FPPassManager::runOnFunction(llvm::Function&) + 383
18 llc             0x000000000140e484 llvm::FPPassManager::runOnModule(llvm::Module&) + 102
19 llc             0x000000000140e7ac llvm::MPPassManager::runOnModule(llvm::Module&) + 442
20 llc             0x000000000140ecc4 llvm::PassManagerImpl::run(llvm::Module&) + 120
21 llc             0x000000000140ee77 llvm::PassManager::run(llvm::Module&) + 39
22 llc             0x000000000083b8a3 main + 4244
23 libc.so.6       0x00007f2675993ead __libc_start_main + 253
24 llc             0x000000000083a239
Stack dump:
0.      Program arguments: ./llvm-m68k/build/bin/llc -march=m68k test2.ll
1.      Running pass 'Function Pass Manager' on module 'test2.ll'.
2.      Running pass 'Unnamed pass: implement Pass::getPassName()' on function '@test'
Aborted
nogginthenog is offline  
AdSense AdSense  
 
Page generated in 0.08162 seconds with 9 queries