This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Remove clang builtins for extract_lane and replace_lane
ClosedPublic

Authored by tlively on Jul 21 2021, 2:59 PM.

Details

Summary

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.

Diff Detail

Event Timeline

tlively created this revision.Jul 21 2021, 2:59 PM
tlively requested review of this revision.Jul 21 2021, 2:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2021, 2:59 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dschuff accepted this revision.Jul 21 2021, 3:40 PM
This revision is now accepted and ready to land.Jul 21 2021, 3:40 PM
This revision was landed with ongoing or failed builds.Jul 21 2021, 4:11 PM
This revision was automatically updated to reflect the committed changes.