[llvm-bugs] [Bug 52352] New: wasm64: Crash with register use before def

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Oct 29 09:45:01 PDT 2021


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

            Bug ID: 52352
           Summary: wasm64: Crash with register use before def
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: WebAssembly
          Assignee: unassignedbugs at nondot.org
          Reporter: alex at crichton.co
                CC: llvm-bugs at lists.llvm.org

Created attachment 25399
  --> https://bugs.llvm.org/attachment.cgi?id=25399&action=edit
bugpoint-reduced IR

I apologize in advance for the bad title here. In an effort to test out Rust on
the wasm64 backend I was curious to test out the performance of a
wasm32-vs-wasm64 program and the first thing I was going to test was a wasm
program that itself implements a wasm text parser. In compiling this program
though (Rust source code) I got a crash in LLVM:


llc:
/home/acrichto/code/rust/src/llvm-project/llvm/lib/CodeGen/MachineLoopInfo.cpp:199:
bool llvm::MachineLoop::isLoopInvariant(llvm::MachineInstr&) const: Assertion
`MRI->getVRegDef(Reg) && "Machine instr not mapped for this vreg?!"' failed.


Using bugpoint on the suspect LLVM module I was able to reduce the original
test case but it unfortunately gives a different crash now:


llc:
/home/acrichto/code/rust/src/llvm-project/llvm/lib/CodeGen/LiveVariables.cpp:129:
void llvm::LiveVariables::HandleVirtRegUse(llvm::Register,
llvm::MachineBasicBlock*, llvm::MachineInstr&): Assertion `MRI->getVRegDef(Reg)
&& "Register use before def!"' failed.


In any case this seemed like a good point to open up a bug. I've attached both
the un-minimized module as well as the bugpoint-reduced module here in case
fixing the bugpoint issue is distinct from the original issue.

-- 
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/20211029/a6d2e9c0/attachment.html>


More information about the llvm-bugs mailing list