You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 22dc398
Browse filesBrowse the repository at this point in the historyBrowse files
[JSC] Implement VectorDupElement for all integers in x64
https://bugs.webkit.org/show_bug.cgi?id=329538
rdar://191379267
Reviewed by Vassili Bykov.
This patch implements VectorDupElement for all integers in x64 so we can
use this in ARM64 and x64. We also tweak Rosetta's CPU features as it is
now supporting both AVX and AVX2.
1. i16x8
We use vpshuflw / vpshufhw to spread one lane in each half part, then
spread it via vpshufd.
2. i8x16
Use vpunpcklbw to spread one side into interleaving other lane, and then
now each i8x2 gets the expected one, so we spread it with i16x8 way.
Both use vpbroadcast[bw] if available.
Tests: JSTests/wasm/stress/simd-shuffle-dup-element.js
Source/JavaScriptCore/assembler/testmasm.cpp
* JSTests/wasm/stress/simd-shuffle-dup-element.js: Added.
(async test):
* Source/JavaScriptCore/assembler/MacroAssemblerX86_64.cpp:
(JSC::MacroAssemblerX86_64::collectCPUFeatures):
* Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::vectorDupElement):
(JSC::MacroAssemblerX86_64::dupInt16Element):
* Source/JavaScriptCore/assembler/X86Assembler.h:
(JSC::X86Assembler::vpshufhw_i8rr):
* Source/JavaScriptCore/assembler/testmasm.cpp:
(JSC::testVectorDupElement):
* Source/JavaScriptCore/b3/B3ReduceStrength.cpp:
* Source/JavaScriptCore/b3/air/AirOpcode.opcodes:
* Source/JavaScriptCore/jit/SIMDShuffle.h:
(JSC::SIMDShuffle::isDupElement):
* Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::addSIMDShuffle):
Canonical link: https://commits.webkit.org/325305@main
0 commit comments