This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Implement pseudo-min/max SIMD instructions
ClosedPublic

Authored by tlively on May 11 2020, 1:10 PM.

Details

Summary

As proposed in https://github.com/WebAssembly/simd/pull/122. Since
these instructions are not yet merged to the SIMD spec proposal, this
patch makes them entirely opt-in by surfacing them only through LLVM
intrinsics and clang builtins. If these instructions are made
official, these intrinsics and builtins should be replaced with simple
instruction patterns.

Diff Detail

Event Timeline

tlively created this revision.May 11 2020, 1:10 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 11 2020, 1:10 PM
aheejin accepted this revision.May 11 2020, 4:58 PM
aheejin added inline comments.
clang/include/clang/Basic/BuiltinsWebAssembly.def
147

For unimplemented instructions, when do we use simd128 and when unimplemented-simd128?

This revision is now accepted and ready to land.May 11 2020, 4:58 PM
tlively marked an inline comment as done.May 11 2020, 5:35 PM
tlively added inline comments.
clang/include/clang/Basic/BuiltinsWebAssembly.def
147

unimplemented-simd128 is better when the V8 implementation is expected to lag significantly behind the toolchain implementation, but in this case the instructions are being implemented in V8 in parallel. Using simd128 makes it much easier for users to experiment with.

This revision was automatically updated to reflect the committed changes.