]> granicus.if.org Git - llvm/commit
[WebAssembly] Add builtin and intrinsic for v8x16.swizzle
authorThomas Lively <tlively@google.com>
Wed, 9 Oct 2019 17:45:47 +0000 (17:45 +0000)
committerThomas Lively <tlively@google.com>
Wed, 9 Oct 2019 17:45:47 +0000 (17:45 +0000)
commit8a11fbf479b8888d50b8cdb14e0d25cdc0b5a207
tree63602e97ba7d69cb128c7d997254336720aaf9ff
parent4a07687da6745619246689463350c339c9f9d2c6
[WebAssembly] Add builtin and intrinsic for v8x16.swizzle

Summary:
This clang builtin and corresponding LLVM intrinsic are necessary to
expose the exact semantics of the underlying WebAssembly instruction
to users. LLVM produces a poison value if the dynamic swizzle indices
are greater than the vector size, but the WebAssembly instruction sets
the corresponding output lane to zero. Users who depend on this
behavior can safely use this builtin.

Depends on D68527.

Reviewers: aheejin, dschuff

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

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D68531

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374189 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IntrinsicsWebAssembly.td
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
test/CodeGen/WebAssembly/simd-intrinsics.ll