This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Remove unimplemented-simd target features
ClosedPublic

Authored by tlively on Mar 11 2021, 2:46 PM.

Details

Summary

Now that the WebAssembly SIMD specification is finalized and engines are
generally up-to-date, there is no need for a separate target feature for gating
SIMD instructions that engines have not implemented. With this change,
v128.const is now enabled by default with the simd128 target feature.

Diff Detail

Event Timeline

tlively created this revision.Mar 11 2021, 2:46 PM
tlively requested review of this revision.Mar 11 2021, 2:46 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 11 2021, 2:46 PM
tlively updated this revision to Diff 330093.Mar 11 2021, 4:03 PM
  • Restore partially-removed qfma/qfms
dschuff accepted this revision.Mar 12 2021, 11:15 AM
dschuff added inline comments.
clang/docs/ClangCommandLineReference.rst
3801

extraneous change?

clang/include/clang/Basic/BuiltinsWebAssembly.def
191

is QFMA actually in MVP simd? I thought it was non-deterministic?

llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
1712

out of curiosity, are there any cases where a splat could be smaller than a v128 const, since the consts are pretty big?

This revision is now accepted and ready to land.Mar 12 2021, 11:15 AM
tlively added inline comments.Mar 12 2021, 11:52 AM
clang/docs/ClangCommandLineReference.rst
3801

Yes, will revert, thanks.

clang/include/clang/Basic/BuiltinsWebAssembly.def
191

No, as you discovered, it's removed in the next patch. I kind of ended up with these patches in the wrong order, but I think it should be ok.

llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
1712

Yes, for sure. In fact, this code used to find the const lowering that resulted in the fewest bytes emitted. Our users much prefer to have the fewest instructions emitted, though, since this lowering is often critical for performance.

This revision was landed with ongoing or failed builds.Mar 18 2021, 10:23 AM
This revision was automatically updated to reflect the committed changes.
llvm/test/CodeGen/WebAssembly/simd-load-splat.ll