[llvm-bugs] [Bug 47944] New: Assertion failure in WebAssemblyRegisterInfo::eliminateFrameIndex()

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 22 04:47:04 PDT 2020


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

            Bug ID: 47944
           Summary: Assertion failure in
                    WebAssemblyRegisterInfo::eliminateFrameIndex()
           Product: libraries
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: WebAssembly
          Assignee: unassignedbugs at nondot.org
          Reporter: jjorge at quarkslab.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 24091
  --> https://bugs.llvm.org/attachment.cgi?id=24091&action=edit
Output of the crash

With clang compiled from the release/11.x branch, when compiling the reduced
test case below for the wasm32 target with

clang -target wasm32 -c test.ll  -o /dev/null

Where test.ll is

target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"

@str = hidden local_unnamed_addr global [3 x i8] c"abc", align 16

define i8 @failing() {
0:
  %1 = alloca i8, align 4

  %2 = ptrtoint i8* %1 to i32
  %3 = getelementptr [3 x i8], [3 x i8]* @str, i32 0, i32 %2
  %4 = load i8, i8* %3, align 8
  %5 = and i8 %4, 67

  ret i8 %5
}

Clang fails with the following message:

llvm/include/llvm/CodeGen/MachineOperand.h:536: int64_t
llvm::MachineOperand::getImm() const: Assertion `isImm() && "Wrong
MachineOperand accessor"' failed.

The call to getImm() is done at line 105 of WebAssemblyRegisterInfo.

See the attached log for details.

-- 
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/20201022/c5224c0a/attachment.html>


More information about the llvm-bugs mailing list