• Ng Zhi An's avatar
    [wasm-simd][x64] Don't force dst to be same as src on AVX · 813ae013
    Ng Zhi An authored
    On AVX, many instructions can have 3 operands, unlike SSE which only has
    2. So on SSE we use DefineSameAsFirst on the dst. But on AVX, using that
    will cause some unnecessary moves.
    
    This patch changes a couple of F32x4 and S128 instructions to remove
    this restriction when AVX is supported.
    
    We can't use AvxHelper since it duplicates the dst for the call to the
    AVX instruction, which isn't what we want. The alternative is to
    redefine Mulps and other functions here, but there are other callsites
    that depend on this duplicated-dst behavior, so it's harder to change.
    We can migrate this as we move more logic over to non-DefineSameAsFirst
    for AVX.
    
    With the meshopt_decoder.js in the linked bug, it removes 8 SIMD movs
    (from a function that has 300+ lines of assembly.)
    
    Note that from agner's microarchitecture.pdf, page 127, "Elimination of
    move instructions", many times such moves can be eliminated by the
    processor. So this change won't speed up perf, but it helps a bit with
    binary size, and decoder pressure.
    
    Bug: v8:10116,v8:9561
    Change-Id: I125bfd44e728ef08312620bc00f6433f376e69e3
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2465653Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
    Commit-Queue: Zhi An Ng <zhin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70462}
    813ae013
Name
Last commit
Last update
..
api Loading commit data...
asmjs Loading commit data...
ast Loading commit data...
base Loading commit data...
builtins Loading commit data...
codegen Loading commit data...
common Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
d8 Loading commit data...
date Loading commit data...
debug Loading commit data...
deoptimizer Loading commit data...
diagnostics Loading commit data...
execution Loading commit data...
extensions Loading commit data...
flags Loading commit data...
handles Loading commit data...
heap Loading commit data...
ic Loading commit data...
init Loading commit data...
inspector Loading commit data...
interpreter Loading commit data...
json Loading commit data...
libplatform Loading commit data...
libsampler Loading commit data...
logging Loading commit data...
numbers Loading commit data...
objects Loading commit data...
parsing Loading commit data...
profiler Loading commit data...
protobuf Loading commit data...
regexp Loading commit data...
roots Loading commit data...
runtime Loading commit data...
sanitizer Loading commit data...
snapshot Loading commit data...
strings Loading commit data...
tasks Loading commit data...
third_party Loading commit data...
torque Loading commit data...
tracing Loading commit data...
trap-handler Loading commit data...
utils Loading commit data...
wasm Loading commit data...
zone Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...