llvm-project/clang/lib
Thomas Lively 8e3e56f2a3 [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic
Summary:

Although using `__builtin_shufflevector` and the `shufflevector`
instruction works fine, they are not opaque to the optimizer. As a
result, DAGCombine can potentially reduce the number of shuffles and
change the shuffle masks. This is unexpected behavior for users of the
WebAssembly SIMD intrinsics who have crafted their shuffles to
optimize the code generated by engines. This patch solves the problem
by adding a new shuffle intrinsic that is opaque to the optimizers in
line with the decision of the WebAssembly SIMD contributors at
https://github.com/WebAssembly/simd/issues/196#issuecomment-622494748. In
the future we may implement custom DAG combines to properly optimize
shuffles and replace this solution.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D66983
2020-05-11 10:01:55 -07:00
..
ARCMigrate [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec. 2020-04-23 17:21:25 -04:00
AST Fix -Wunused compiler warning. 2020-05-11 09:20:48 +02:00
ASTMatchers [ASTMatchers] Fix isDerivedFrom for recursive templates 2020-04-15 12:49:01 -07:00
Analysis Reapply "Add support for #pragma float_control" with buildbot fixes 2020-05-04 05:51:25 -07:00
Basic [gcov] Default coverage version to '407*' and delete CC1 option -coverage-cfg-checksum 2020-05-10 16:14:07 -07:00
CodeGen [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic 2020-05-11 10:01:55 -07:00
CrossTU Revert "[analyzer] On-demand parsing capability for CTU" 2020-04-27 14:27:04 +02:00
DirectoryWatcher [DirectoryWatcher] Do not use FSEvents on non-macOS platforms 2020-04-23 10:22:28 -07:00
Driver [Clang] Pass -z max-page-size to linker for Fuchsia 2020-05-09 13:44:20 -07:00
Edit [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast 2019-07-02 18:28:13 +00:00
Format [clang-format] [PR34574] Handle [[nodiscard]] attribute in class declaration 2020-05-09 11:27:23 +01:00
Frontend [AST] Preserve the type in RecoveryExprs for broken function calls. 2020-05-11 08:46:18 +02:00
FrontendTool [llvm][clang][IFS] Enhancing the llvm-ifs yaml format for symbol lists. 2020-04-01 10:49:06 -04:00
Headers [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic 2020-05-11 10:01:55 -07:00
Index Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
Lex Fix bugs when an included file name is typo corrected. 2020-05-08 13:33:39 -04:00
Parse Enforce the C++11 anonymous enum bitfields check even for 2020-05-10 14:03:50 -07:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema [AST] Preserve the type in RecoveryExprs for broken function calls. 2020-05-11 08:46:18 +02:00
Serialization [clang] Fix an uint32_t overflow in large preamble. 2020-05-05 10:36:34 +02:00
StaticAnalyzer [analyzer] Stability improvement for IteratorModeling 2020-05-06 14:16:39 +03:00
Tooling Strip -showIncludes in getClangStripDependencyFileAdjuster() 2020-04-27 11:20:08 -07:00
CMakeLists.txt Reland [clang] DirectoryWatcher 2019-07-12 20:34:10 +00:00