[all-commits] [llvm/llvm-project] db7efc: [WebAssembly] Remove clang builtins for extract_la...

Thomas Lively via All-commits all-commits at lists.llvm.org
Wed Jul 21 16:11:14 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: db7efcab7dd9c969179a86fb27149743a0f1f491
      https://github.com/llvm/llvm-project/commit/db7efcab7dd9c969179a86fb27149743a0f1f491
  Author: Thomas Lively <tlively at google.com>
  Date:   2021-07-21 (Wed, 21 Jul 2021)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsWebAssembly.def
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/Headers/wasm_simd128.h
    M clang/test/CodeGen/builtins-wasm.c

  Log Message:
  -----------
  [WebAssembly] Remove clang builtins for extract_lane and replace_lane

These builtins were added to capture the fact that the underlying Wasm
instructions return i32s and implicitly sign or zero extend the extracted lanes
in the case of the i8x16 and i16x8 variants. But we do sufficient optimizations
during code gen that these low-level details do not need to be exposed to users.

This commit replaces the use of the builtins in wasm_simd128.h with normal
target-independent vector code. As a result, we can switch the relevant
intrinsics to use functions rather than macros and can use more user-friendly
return types rather than trying to precisely expose the underlying Wasm types.
Note, however, that the generated LLVM IR is no different after this change.

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




More information about the All-commits mailing list