[all-commits] [llvm/llvm-project] 2368f1: [WebAssembly] Fixed AsmPrinter not emitting .funct...

Wouter van Oortmerssen via All-commits all-commits at lists.llvm.org
Tue Feb 22 16:15:00 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2368f18eb305ae9d5a4f2110c048e5daf5007992
      https://github.com/llvm/llvm-project/commit/2368f18eb305ae9d5a4f2110c048e5daf5007992
  Author: Wouter van Oortmerssen <aardappel at gmail.com>
  Date:   2022-02-22 (Tue, 22 Feb 2022)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
    A llvm/test/MC/WebAssembly/extern-functype-intrinsic.ll

  Log Message:
  -----------
  [WebAssembly] Fixed AsmPrinter not emitting .functype for intrinsics

Intrinsics like `memset` were not emitted as `.functype` because
WebAssemblyAsmPrinter::emitExternalDecls explicitly skips symbols
that are isIntrinsic. Removing that check doesn't work, since the symbol
from the module refers to a 4-argument `llvm.memset.p0i8.i32` rather
than the 3-argument `memset` symbol referenced in the call.
Our `WebAssemblyMCLowerPrePass` however does collect the
`memset` symbol, so the current solution is as simple as emitting
`.functype` for those.

Fixes: https://github.com/llvm/llvm-project/issues/53712

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




More information about the All-commits mailing list