[LLVMbugs] [Bug 2947] New: CellSPU assert "Register use before def!"

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Oct 24 15:19:46 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2947

           Summary: CellSPU assert "Register use before def!"
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: bwatt at us.ibm.com
                CC: llvmbugs at cs.uiuc.edu


When using the CellSPU backend the following program gets an assert failure:
`MRI->getVRegDef(reg) && "Register use before def!"'.

Input file, main.c:

void func2();
void func() {
  func2();
}

Script:

clang -emit-llvm main.c
llvm-as main.ll -f
opt -std-compile-opts main.bc -o main.opt.bc -f
llc -march=cellspu main.opt.bc -f -o main.s

Output:

llc: LiveVariables.cpp:129: void llvm::LiveVariables::HandleVirtRegUse(unsigned
int, llvm::MachineBasicBlock*, llvm::MachineInstr*): Assertion
`MRI->getVRegDef(reg) && "Register use before def!"' failed.
llc[0xfa9d3b]
llc[0xfa9e5c]
/lib64/libc.so.6[0x358c8322a0]
/lib64/libc.so.6(gsignal+0x35)[0x358c832215]
/lib64/libc.so.6(abort+0x183)[0x358c833d83]
/lib64/libc.so.6(__assert_fail+0xe9)[0x358c82b039]
llc(_ZN4llvm13LiveVariables16HandleVirtRegUseEjPNS_17MachineBasicBlockEPNS_12MachineInstrE+0xd5)[0xd6b14d]
llc(_ZN4llvm13LiveVariables20runOnMachineFunctionERNS_15MachineFunctionE+0x5ce)[0xd6c628]
llc(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0x31)[0x820171]
llc(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0xef)[0xf39395]
llc(_ZN4llvm23FunctionPassManagerImpl3runERNS_8FunctionE+0x74)[0xf39ed8]
llc(_ZN4llvm19FunctionPassManager3runERNS_8FunctionE+0x80)[0xf3a036]
llc(main+0x8ba)[0x7bdbc8]
/lib64/libc.so.6(__libc_start_main+0xfa)[0x358c81e32a]
llc(atan+0xf1)[0x7bc5d9]
./x: line 4: 17751 Aborted                 llc -march=cellspu main.opt.bc -f -o
main.s


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list