[PATCH] D139871: [WebAssembly] Replace LOAD_SPLAT with SPLAT_VECTOR

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 12:00:58 PST 2022


luke created this revision.
luke added reviewers: asb, aheejin, samparker, tlively.
Herald added subscribers: pmatos, armkevincheng, sjarus, eric-k256, StephenFan, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100, dschuff.
Herald added a project: All.
luke requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Splats were selected by matching on uses of `build_vector` with
identical elements, but a while back a target independent node for
vector splatting was added.
This removes the WebAssembly specific LOAD_SPLAT intrinsic, and instead
makes SPLAT_VECTOR legal and adds patterns for splat loads.

It also has the effect of replacing splatted vector constants with a
scalar constant and a splat, which should save on code size.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139871

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyISD.def
  llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
  llvm/test/CodeGen/WebAssembly/fpclamptosat_vec.ll
  llvm/test/CodeGen/WebAssembly/masked-shifts.ll
  llvm/test/CodeGen/WebAssembly/simd-arith.ll
  llvm/test/CodeGen/WebAssembly/simd-build-vector.ll
  llvm/test/CodeGen/WebAssembly/simd-conversions.ll
  llvm/test/CodeGen/WebAssembly/simd-load-splat.ll
  llvm/test/CodeGen/WebAssembly/simd-offset.ll
  llvm/test/CodeGen/WebAssembly/simd-pr51605.ll
  llvm/test/CodeGen/WebAssembly/simd-shift-complex-splats.ll
  llvm/test/CodeGen/WebAssembly/simd-vector-trunc.ll
  llvm/test/CodeGen/WebAssembly/simd.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139871.482217.patch
Type: text/x-patch
Size: 49236 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221212/353247e0/attachment.bin>


More information about the llvm-commits mailing list