• Zhi An Ng's avatar
    [x64][ia32][wasm-simd] Optimize v128.bitselect · 8e9ad4f8
    Zhi An Ng authored
    Couple of optimizations for v128.bitselect on both ia32 and x64.
    
    1. Remove an extra movaps when AVX is supported, since we have 3-operand
    instructions
    2. Tweak the algorithm from:
         xor(and(xor(src1, src2), mask) src2)
    
       To:
         or(and(src1, mask), andnot(src2, mask))
       It is easier to read and understand, and also eliminate a dependency
       chain (on kScratchDoubleReg) in the older algorithm.
    3. Use integer forms of the logical ops. Older processors have higher
    throughput on these, compared to the floating point ops. However, the
    integer forms are 1 byte longer, so on SSE, we stick to the floating
    point ops.
    
    For AVX, this reduces instruction count from 9948 to 9868.
    
    Change-Id: Idd5d26b99a76255dbfa63e2c304e6af3760c4ec6
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2591859Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
    Commit-Queue: Zhi An Ng <zhin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#71845}
    8e9ad4f8
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...
DIR_METADATA Loading commit data...
OWNERS Loading commit data...