[llvm-bugs] [Bug 24931] New: arm: Assertion failed: (!VRM->hasPhys(SplitVirtReg->reg) && "Register already assigned"), function allocatePhysRegs

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 24 13:51:29 PDT 2015


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

            Bug ID: 24931
           Summary: arm: Assertion failed:
                    (!VRM->hasPhys(SplitVirtReg->reg) && "Register already
                    assigned"), function allocatePhysRegs
           Product: new-bugs
           Version: trunk
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

I received a crasher for compiling concurrencykit on arm-freebsd.  It results
in an assertion failure with clang trunk r248374.  I could reduce this to the
following:

x0, x1, x2;
static x3;
long long x4;
x5() {
  long long x6 = x0, x7 = 0;
  int x8;
  __asm__("" : "=&r"(x8), "=&r"(x4) : "r"(x7), "r"(x6), "r"(1) : "5", "6");
}
x9() {
  for (;;) {
    x5(&x3);
    while (x10(x3, x1, x2))
      ;
  }
}

Compiled with: clang -cc1 -triple arm-linux -emit-obj -mdisable-fp-elim
-target-cpu arm1176jzf-s -O2 testcase.c

results in:

Assertion failed: (!VRM->hasPhys(SplitVirtReg->reg) && "Register already
assigned"), function allocatePhysRegs, file lib/CodeGen/RegAllocBase.cpp, line
141.
Abort trap

Stack trace:

#0  0x2b2aaf3b in thr_kill () from /lib/libc.so.7
#1  0x2b2aaf2c in raise () from /lib/libc.so.7
#2  0x2b2aae73 in abort () from /lib/libc.so.7
#3  0x2b3132d8 in __assert () from /lib/libc.so.7
#4  0x08d8cf81 in llvm::RegAllocBase::allocatePhysRegs() ()
#5  0x08c479db in (anonymous
namespace)::RAGreedy::runOnMachineFunction(llvm::MachineFunction&) ()
#6  0x08bd71ff in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) ()
#7  0x08eca5eb in llvm::FPPassManager::runOnFunction(llvm::Function&) ()
#8  0x08eca8a2 in llvm::FPPassManager::runOnModule(llvm::Module&) ()
#9  0x08ecae27 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
#10 0x08ecb6b8 in llvm::legacy::PassManager::run(llvm::Module&) ()
#11 0x0937a12e in clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::StringRef, llvm::Module*, clang::BackendAction,
llvm::raw_pwrite_stream*) ()
#12 0x09a3bac7 in
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) ()
#13 0x09d9ace5 in clang::ParseAST(clang::Sema&, bool, bool) ()
#14 0x096e8f06 in clang::ASTFrontendAction::ExecuteAction() ()
#15 0x09a3a66e in clang::CodeGenAction::ExecuteAction() ()
#16 0x096e87a3 in clang::FrontendAction::Execute() ()
#17 0x096b4d98 in
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
#18 0x0976495a in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ()
#19 0x082e5100 in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) ()
#20 0x082e3ce8 in main ()

-- 
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/20150924/4b23f025/attachment.html>


More information about the llvm-bugs mailing list