[all-commits] [llvm/llvm-project] 104a24: [WebAssembly] Produce error when encountering unlo...

Alex Bradbury via All-commits all-commits at lists.llvm.org
Wed Aug 10 02:35:04 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 104a24ec8bd4bc0e0acbb81c03b916c0c64e85b2
      https://github.com/llvm/llvm-project/commit/104a24ec8bd4bc0e0acbb81c03b916c0c64e85b2
  Author: Alex Bradbury <asb at igalia.com>
  Date:   2022-08-10 (Wed, 10 Aug 2022)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    A llvm/test/CodeGen/WebAssembly/global-get-unlowerable.ll
    A llvm/test/CodeGen/WebAssembly/global-set-unlowerable.ll

  Log Message:
  -----------
  [WebAssembly] Produce error when encountering unlowerable Wasm global accesses

WebAssembly globals are represented as IR globals with the wasm_var
address space (AS1). Prior to this patch, a wasm global load that isn't
lowerable will produce a failure to select, while a wasm global store
will produced incorrect code. This patch ensures we consistently produce
a clear error.

As noted in the test cases, it's conceivable that a frontend or an
optimisation pass could produce similar IR even in the presence of the
semantic restrictions on pointers to Wasm globals in the frontend, which
is a separate problem to address.

Differential Revision: https://reviews.llvm.org/D131387




More information about the All-commits mailing list