aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2020-05-11 09:55:43 -0700
committerThomas Lively <tlively@google.com>2020-05-11 10:01:55 -0700
commit8e3e56f2a36701480eeb65e426701d5a9025cc59 (patch)
tree61a56e15cd31e4230be3d8d6cf7386aed0bfe177 /clang/lib/Frontend/CompilerInvocation.cpp
parentfe69dfebcfa007e23bf528fff8b96ac63e593e34 (diff)
downloadllvm-8e3e56f2a36701480eeb65e426701d5a9025cc59.zip
llvm-8e3e56f2a36701480eeb65e426701d5a9025cc59.tar.gz
llvm-8e3e56f2a36701480eeb65e426701d5a9025cc59.tar.bz2
[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
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions