[PATCH] D100018: [WebAssembly] Add shuffles as an option for lowering BUILD_VECTOR

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 22:30:24 PDT 2021


tlively created this revision.
tlively added reviewers: aheejin, dschuff.
Herald added subscribers: wingo, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100.
tlively requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When lowering a BUILD_VECTOR SDNode, we choose among various possible vector
creation instructions in an attempt to minimize the total number of instructions
used. We previously considered using swizzles, consts, and splats, and this
patch adds shuffles as well. A common pattern that now lowers to shuffles is
when two 64-bit vectors are concatenated. Previously, concatenations generally
lowered to sequences of extract_lane and replace_lane instructions when they
could have been a single shuffle.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100018

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  llvm/test/CodeGen/WebAssembly/simd-build-vector.ll
  llvm/test/CodeGen/WebAssembly/simd-concat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100018.335723.patch
Type: text/x-patch
Size: 10654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210407/41b315b9/attachment.bin>


More information about the llvm-commits mailing list