[LLVMbugs] [Bug 23377] New: Hexagon: test/CodeGen/Generic/MachineBranchProb.ll crashes

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 29 18:57:37 PDT 2015


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

            Bug ID: 23377
           Summary: Hexagon: test/CodeGen/Generic/MachineBranchProb.ll
                    crashes
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: hans at chromium.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

It started failing after I added a test as part of r236192, but it turns out
that test crashes regardless of my change or not. It also has nothing to do
with branch weights:

$ cat | bin/llc -o /dev/null -march=hexagon -mcpu=hexagonv5                     
declare void @g(i32)
define void @left_leaning_weight_balanced_tree(i32 %x) {
entry:
  switch i32 %x, label %return [
    i32 0,  label %bb0
    i32 10, label %bb1
    i32 20, label %bb2
    i32 30, label %bb3
    i32 40, label %bb4
    i32 50, label %bb5
  ]
bb0: tail call void @g(i32 0) br label %return
bb1: tail call void @g(i32 1) br label %return
bb2: tail call void @g(i32 2) br label %return
bb3: tail call void @g(i32 3) br label %return
bb4: tail call void @g(i32 4) br label %return
bb5: tail call void @g(i32 5) br label %return
return: ret void
}
llc: ../include/llvm/CodeGen/MachineOperand.h:423: llvm::MachineBasicBlock
*llvm::MachineOperand::getMBB() const: Assertion `isMBB() && "Wrong
MachineOperand accessor"' failed.
#0 0x1ea3a6e llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/work/llvm/build.debug/../lib/Support/Unix/Signals.inc:430:15
#1 0x1ea49e9 PrintStackTraceSignalHandler(void*)
/work/llvm/build.debug/../lib/Support/Unix/Signals.inc:489:1
#2 0x1ea4eee SignalHandler(int)
/work/llvm/build.debug/../lib/Support/Unix/Signals.inc:205:60
#3 0x7f7d6f3b4340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#4 0x7f7d6e5d5cc9 gsignal
/build/buildd/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x7f7d6e5d90d8 abort /build/buildd/eglibc-2.19/stdlib/abort.c:91:0
#6 0x7f7d6e5ceb86 __assert_fail_base
/build/buildd/eglibc-2.19/assert/assert.c:92:0
#7 0x7f7d6e5cec32 (/lib/x86_64-linux-gnu/libc.so.6+0x2fc32)
#8 0x77d6ba llvm::MachineOperand::getMBB() const
/work/llvm/build.debug/../include/llvm/CodeGen/MachineOperand.h:424:5
#9 0xbd4289 llvm::HexagonInstrInfo::AnalyzeBranch(llvm::MachineBasicBlock&,
llvm::MachineBasicBlock*&, llvm::MachineBasicBlock*&,
llvm::SmallVectorImpl<llvm::MachineOperand>&, bool) const
/work/llvm/build.debug/../lib/Target/Hexagon/HexagonInstrInfo.cpp:274:13
#10 0x1565b52 (anonymous namespace)::IfConverter::RemoveExtraEdges((anonymous
namespace)::IfConverter::BBInfo&)
/work/llvm/build.debug/../lib/CodeGen/IfConversion.cpp:971:8
#11 0x1563007 (anonymous namespace)::IfConverter::IfConvertSimple((anonymous
namespace)::IfConverter::BBInfo&, (anonymous
namespace)::IfConverter::IfcvtKind)
/work/llvm/build.debug/../lib/CodeGen/IfConversion.cpp:1102:7
#12 0x1561e7b (anonymous
namespace)::IfConverter::runOnMachineFunction(llvm::MachineFunction&)
/work/llvm/build.debug/../lib/CodeGen/IfConversion.cpp:348:18
#13 0x160640e llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/work/llvm/build.debug/../lib/CodeGen/MachineFunctionPass.cpp:40:10
#14 0x19ea65d llvm::FPPassManager::runOnFunction(llvm::Function&)
/work/llvm/build.debug/../lib/IR/LegacyPassManager.cpp:1537:23
#15 0x19ea968 llvm::FPPassManager::runOnModule(llvm::Module&)
/work/llvm/build.debug/../lib/IR/LegacyPassManager.cpp:1557:16
#16 0x19eb029 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&)
/work/llvm/build.debug/../lib/IR/LegacyPassManager.cpp:1615:23
#17 0x19eac1e llvm::legacy::PassManagerImpl::run(llvm::Module&)
/work/llvm/build.debug/../lib/IR/LegacyPassManager.cpp:1722:16
#18 0x19eb4d1 llvm::legacy::PassManager::run(llvm::Module&)
/work/llvm/build.debug/../lib/IR/LegacyPassManager.cpp:1755:10
#19 0x75aa41 compileModule(char**, llvm::LLVMContext&)
/work/llvm/build.debug/../tools/llc/llc.cpp:378:3
#20 0x7598b6 main /work/llvm/build.debug/../tools/llc/llc.cpp:201:22
#21 0x7f7d6e5c0ec5 __libc_start_main
/build/buildd/eglibc-2.19/csu/libc-start.c:321:0
#22 0x7595d4 _start (/usr/local/google/work/llvm/build.debug/bin/llc+0x7595d4)
Stack dump:
0.      Program arguments: bin/llc -o /dev/null -march=hexagon -mcpu=hexagonv5 
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
2.      Running pass 'If Converter' on function
'@left_leaning_weight_balanced_tree'
Aborted

-- 
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/20150430/d1aeb320/attachment.html>


More information about the llvm-bugs mailing list