This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Prototype i16x8.q15mulr_sat_s
ClosedPublic

Authored by tlively on Oct 7 2020, 7:56 AM.

Details

Summary

This saturating, rounding, Q-format multiplication instruction is proposed in
https://github.com/WebAssembly/simd/pull/365.

Diff Detail

Event Timeline

tlively created this revision.Oct 7 2020, 7:56 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 7 2020, 7:56 AM
tlively requested review of this revision.Oct 7 2020, 7:56 AM
aheejin accepted this revision.Oct 8 2020, 3:39 AM
aheejin added inline comments.
clang/include/clang/Basic/BuiltinsWebAssembly.def
117
  • Is it implemented in the VM? If not shouldn't we use unimplemented-simd128?
  • Are the args and the result unsigned?
This revision is now accepted and ready to land.Oct 8 2020, 3:39 AM
tlively added inline comments.Oct 9 2020, 1:14 PM
clang/include/clang/Basic/BuiltinsWebAssembly.def
117

Instead of using unimplemented-simd128, we're protecting users from accidentally using this instruction by making it opt-in via the builtin function. If they don't explicitly write the builtin, they won't get the instruction.

Good point about the sign of the arguments. They should be signed and I will fix that.

This revision was landed with ongoing or failed builds.Oct 9 2020, 2:18 PM
This revision was automatically updated to reflect the committed changes.