]> granicus.if.org Git - llvm/commit
[WebAssembly] Optimize BUILD_VECTOR lowering for size
authorThomas Lively <tlively@google.com>
Wed, 30 Jan 2019 02:23:29 +0000 (02:23 +0000)
committerThomas Lively <tlively@google.com>
Wed, 30 Jan 2019 02:23:29 +0000 (02:23 +0000)
commit20c54d96c737903675fff6ce593cc81b1b667c07
treebaac45c7e963dd2626a6ff2980fe303a04203785
parent553368f2f86e273943dc420b473ba9e8645317c2
[WebAssembly] Optimize BUILD_VECTOR lowering for size

Summary:
Implements custom lowering logic that finds the optimal value for the
initial splat of the vector and either uses it or uses v128.const if
it is available and if it would produce smaller code. This logic
replaces large TableGen ISEL patterns that would lower all non-splat
BUILD_VECTORs into a splat followed by a fixed number of replace_lane
instructions. This CL fixes PR39685.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352592 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
lib/Target/WebAssembly/WebAssemblyISelLowering.h
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
test/CodeGen/WebAssembly/simd-build-vector.ll [new file with mode: 0644]