v8/src
Ng Zhi An 19be491388 [wasm-simd] Optimize codegen when shift is constant
Define a macro in code-generator-x64 to help identify cases when the
shift value is an immediate/constant. In those cases we can directly
emit the shifts without any masking, since the instruction selector
would have modulo-ed the shift value. We also don't need any temporaries
in this case.

This is only x64 codegen, optimizations for other archs will come in
future patches (and will probably look very similar to this).

The current test case passes the shifts as an immediate, so we add a new
path that loads the shift value from memory, thereby exercising the
slower path of non-immediate shift value.

Bug: v8:10115
Change-Id: Iaf13d81595714882a8f5418734e031b8bc654af3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2026067
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66074}
2020-01-31 21:39:25 +00:00
..
api Revert "[wasm] Tierdown wasm module upon "Debugger.enable"" 2020-01-30 17:29:52 +00:00
asmjs [wasm] Implement toString of exported functions 2020-01-24 12:53:31 +00:00
ast [ast] Allocate cons strings on-demand 2020-01-30 11:04:26 +00:00
base Improve iterator_range to take non-&& arguments 2020-01-28 13:03:43 +00:00
builtins [promises] Port remaining promise code to Torque. 2020-01-29 18:02:40 +00:00
codegen [promises] Port remaining promise code to Torque. 2020-01-29 18:02:40 +00:00
common Make the alignment of code explicit 2020-01-17 15:36:47 +00:00
compiler [wasm-simd] Optimize codegen when shift is constant 2020-01-31 21:39:25 +00:00
compiler-dispatcher Remove mstarzinger@ from OWNERS files. 2019-12-13 11:13:14 +00:00
d8 Suppress some console functions for fuzzing 2020-01-29 18:00:10 +00:00
date [cleanup] Split out bit-field.h and bounds.h from utils/utils.h 2019-11-15 13:00:08 +00:00
debug Revert "[wasm] Tierdown wasm module upon "Debugger.enable"" 2020-01-30 17:29:52 +00:00
deoptimizer [cleanup] Refactor CodeEventListener to use handles 2020-01-02 09:13:34 +00:00
diagnostics Fix printing wasm scripts 2020-01-31 14:41:35 +00:00
execution [tools] Add a VMState for Atomics.wait 2020-01-31 16:04:55 +00:00
extensions Reland "Support Intel VTune ITT API" 2019-12-17 13:34:36 +00:00
flags Whitelist natives for fuzzing 2020-01-31 15:08:45 +00:00
handles heap: Fixes for copying/moving traced references 2020-01-19 23:05:07 +00:00
heap heap: Remove unused incremental marking should hurry flag 2020-01-31 15:34:35 +00:00
ic [cleanup] Tnodify number conversion and *Feedback methods 2020-01-14 18:48:28 +00:00
init [ast] Allocate cons strings on-demand 2020-01-30 11:04:26 +00:00
inspector [inspector] Fix async stepping throw extension code. 2020-01-31 15:17:06 +00:00
interpreter Reland 2 ScriptContext CLs 2020-01-22 15:40:06 +00:00
json [json] Update feedback maps since they might be deprecated 2019-12-17 10:42:26 +00:00
libplatform [platform] Support nestable and non-nestable tasks in DefaultForegroundTaskRunner 2020-01-24 01:07:50 +00:00
libsampler libsampler fix register calls for FreeBSD 2019-11-28 09:42:39 +00:00
logging [api] New function for reallocating ArrayBuffer backing store 2020-01-30 12:05:17 +00:00
numbers Rename clemensh to clemensb in OWNERS 2019-09-26 08:44:44 +00:00
objects [Intl] Change order of "currency" and "unit" validation. 2020-01-31 20:31:05 +00:00
parsing Whitelist natives for fuzzing 2020-01-31 15:08:45 +00:00
profiler [tools] Add a VMState for Atomics.wait 2020-01-31 16:04:55 +00:00
protobuf Add OWNERS to src/protobuf 2019-05-15 11:17:23 +00:00
regexp [test] Fix correctness-fuzzer suppression. 2020-01-23 14:35:51 +00:00
roots [offthread] Add OffThreadFactory 2020-01-15 12:38:29 +00:00
runtime Whitelist natives for fuzzing 2020-01-31 15:08:45 +00:00
sanitizer Rename clemensh to clemensb in OWNERS 2019-09-26 08:44:44 +00:00
snapshot [snapshot] Ensure deterministic output with JSArrayBuffer extension 2020-01-30 12:59:21 +00:00
strings Fix MSVC component build 2020-01-16 18:13:34 +00:00
tasks Remove mstarzinger@ from OWNERS files. 2019-12-13 11:13:14 +00:00
third_party Update the dependency of v8_vtunejit 2019-12-23 02:00:49 +00:00
torque [torque] Check pointer size when generating debug helper code 2020-01-23 21:34:30 +00:00
tracing [tracing] Remove id mangling 2020-01-23 12:50:48 +00:00
trap-handler Introducing trap handler support for FreeBSD x64. 2019-11-08 16:46:05 +00:00
utils [utils] Fix construction of constant OwnedVector 2020-01-20 17:11:52 +00:00
wasm [ast] Flatten Wasm function names 2020-01-31 11:25:45 +00:00
zone Remove and update some outdated TODO(mstarzinger). 2019-12-13 10:18:04 +00:00
DEPS [offthread] Add OffThreadFactory support to AST strings 2020-01-16 14:58:54 +00:00
OWNERS Use relative paths to OWNERS files 2019-08-12 13:52:52 +00:00