[LLVMbugs] [Bug 24299] New: branch folder crashes

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 29 07:35:43 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24299

            Bug ID: 24299
           Summary: branch folder crashes
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PTX
          Assignee: unassignedbugs at nondot.org
          Reporter: tobias at grosser.es
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 14661
  --> https://llvm.org/bugs/attachment.cgi?id=14661&action=edit
Test case to reproduce the bug

If I run the attached test case through llc (r243247), I get the following
crash:

llc: include/llvm/MC/MCRegisterInfo.h:325: const llvm::MCRegisterDesc
&llvm::MCRegisterInfo::operator[](unsigned int) const: Assertion `RegNo <
NumRegs && "Attempting to access record for invalid register number!"' failed.
#0 0x15fc18e llvm::sys::PrintStackTrace(llvm::raw_ostream&)
lib/Support/Unix/Signals.inc:404:15
#1 0x15fd109 PrintStackTraceSignalHandler(void*)
lib/Support/Unix/Signals.inc:463:1
#2 0x15fbce3 llvm::sys::RunSignalHandlers() lib/Support/Signals.cpp:35:5        
#3 0x15fd55e SignalHandler(int) lib/Support/Unix/Signals.inc:211:1              
#4 0x7f5f54620c90 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0xfc90)   
#5 0x7f5f5383ee37 gsignal
/build/buildd/glibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#6 0x7f5f53840528 abort /build/buildd/glibc-2.19/stdlib/abort.c:91:0            
#7 0x7f5f53837ce6 __assert_fail_base
/build/buildd/glibc-2.19/assert/assert.c:92:0
#8 0x7f5f53837d92 (/lib/x86_64-linux-gnu/libc.so.6+0x2fd92)                     
#9 0x6e00a7 llvm::MCRegisterInfo::operator[](unsigned int) const
include/llvm/MC/MCRegisterInfo.h:326:5
#10 0x6e004b llvm::MCRegisterInfo::get(unsigned int) const
include/llvm/MC/MCRegisterInfo.h:332:5
#11 0x6dea59 llvm::MCSubRegIterator::MCSubRegIterator(unsigned int,
llvm::MCRegisterInfo const*, bool) include/llvm/MC/MCRegisterInfo.h:458:15
#12 0xea37fe llvm::BranchFolder::OptimizeImpDefsBlock(llvm::MachineBasicBlock*)
lib/CodeGen/BranchFolding.cpp:154:27
#13 0xea3d0e llvm::BranchFolder::OptimizeFunction(llvm::MachineFunction&,
llvm::TargetInstrInfo const*, llvm::TargetRegisterInfo const*,
llvm::MachineModuleInfo*) lib/CodeGen/BranchFolding.cpp:219:19
#14 0xeab7f1 (anonymous
namespace)::BranchFolderPass::runOnMachineFunction(llvm::MachineFunction&)
lib/CodeGen/BranchFolding.cpp:103:10
#15 0xcc2dee llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
lib/CodeGen/MachineFunctionPass.cpp:40:3
#16 0x112932d llvm::FPPassManager::runOnFunction(llvm::Function&)
lib/IR/LegacyPassManager.cpp:1520:23
#17 0x1129645 llvm::FPPassManager::runOnModule(llvm::Module&)
lib/IR/LegacyPassManager.cpp:1540:16
#18 0x1129d30 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&)
lib/IR/LegacyPassManager.cpp:1596:23
#19 0x1129906 llvm::legacy::PassManagerImpl::run(llvm::Module&)
lib/IR/LegacyPassManager.cpp:1698:16
#20 0x112a1e1 llvm::legacy::PassManager::run(llvm::Module&)
lib/IR/LegacyPassManager.cpp:1729:3
#21 0x6a82bc compileModule(char**, llvm::LLVMContext&) tools/llc/llc.cpp:382:3  
#22 0x6a7086 main tools/llc/llc.cpp:204:13                                      
#23 0x7f5f53829ec5 __libc_start_main
/build/buildd/glibc-2.19/csu/libc-start.c:321:0
#24 0x6a6da4 _start (buildbin/llc+0x6a6da4)                                     
Stack dump:                                                                     
0.      Program arguments: buildbin/llc /tmp/branch-folder-bug.ll               
1.      Running pass 'Function Pass Manager' on module
'/tmp/branch-folder-bug.ll'.
2.      Running pass 'Control Flow Optimizer' on function '@hoge'               
~

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150729/a7f5b4e4/attachment.html>


More information about the llvm-bugs mailing list