This currently only defines a constant, but it the future will be used
to gate builtins for experimenting and prototyping relaxed-simd proposal
(https://github.com/WebAssembly/relaxed-simd/).
Details
- Reviewers
tlively - Commits
- rG1552179ac019: [WebAssembly] Add relaxed-simd feature
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
I followed https://reviews.llvm.org/rGb7b9fdc114c1f9c788da914dac5c343277805446 for this, hope it's right, ptal Thomas.
Nice! Thanks for writing this :D Do you know what happens when you actually try to compile some code with -mrelaxed-simd? I'm concerned that it will throw an error because the "relaxed-simd" target feature has not yet been defined in the backend (specifically in WebAssembly.td and in WebAssemblySubtarget.{h,cpp}).
Edit: Here's the corresponding previous patch that added the target feature in the backend: https://reviews.llvm.org/D56501.
clang/lib/Basic/Targets/WebAssembly.cpp | ||
---|---|---|
108–110 | I believe this should be above the SIMD128 case so that when RelaxedSIMD is enabled it falls through and marks SIMD128 as enabled as well. |
It output "'+relaxed-simd' is not a recognized feature for this target (ignoring feature)" but didn't fail compilation. I fixed it by adding to WebAssembly.td and WebAssemblySubtarget.h, thanks!
Edit: Here's the corresponding previous patch that added the target feature in the backend: https://reviews.llvm.org/D56501.
I believe this should be above the SIMD128 case so that when RelaxedSIMD is enabled it falls through and marks SIMD128 as enabled as well.