• 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
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...