[llvm-bugs] [Bug 47933] New: Assertion failure in WebAssemblyFastISel

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 21 05:41:19 PDT 2020


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

            Bug ID: 47933
           Summary: Assertion failure in WebAssemblyFastISel
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jjorge at quarkslab.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

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

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"

define private void @failing(i32 %0) {
entry:
  %1 = alloca i8, i32 4
  %2 = ptrtoint i8* %1 to i32
  %3 = and i32 %2, 2
  %4 = add i32 %2, %3
  %5 = inttoptr i32 %4 to i32*
  store i32 %0, i32* %5
  ret void
}
```

Clang fails with the following message:

llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp:76: void (anonymous
namespace)::WebAssemblyFastISel::Address::setReg(unsigned int): Assertion
`isRegBase() && "Invalid base register access!"' failed.

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/20201021/04c89321/attachment.html>


More information about the llvm-bugs mailing list