Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4db9b8c8a06d7d6423ca8dd375832139644df2de
      
https://github.com/WebKit/WebKit/commit/4db9b8c8a06d7d6423ca8dd375832139644df2de
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-05-05 (Tue, 05 May 2026)

  Changed paths:
    A JSTests/wasm/stress/simd-shuffle-compose-rightimm.js
    M Source/JavaScriptCore/b3/B3ReduceStrength.cpp
    M Source/JavaScriptCore/b3/testb3.h
    M Source/JavaScriptCore/b3/testb3_1.cpp
    M Source/JavaScriptCore/b3/testb3_7.cpp
    M Source/JavaScriptCore/jit/SIMDShuffle.h
    M Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp
    M Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp

  Log Message:
  -----------
  REGRESSION: WebAssembly SIMD produces incorrect result on x86_64 Linux 
(argon2id hash mismatch)
https://bugs.webkit.org/show_bug.cgi?id=314024
rdar://176218743

Reviewed by Marcus Plutowski.

Fix x64 VectorSwizzle emission in OMG. We are using [16, 32) directly as
a shuffle index by using the fact that x64 VectorSwizzle only cares
about bits corresponding to [0, 15]. But this makes handling B3
reduce-strength harder as this convension is different from ARM64 (on
ARM64, any index >= 16 is OOB). We fix this OMG mask generation code.
We also make isOnlyOneSideMask better with careful canonicalization.

Tests: JSTests/wasm/stress/simd-shuffle-compose-rightimm.js
       Source/JavaScriptCore/b3/testb3_1.cpp
       Source/JavaScriptCore/b3/testb3_7.cpp

* JSTests/wasm/stress/simd-shuffle-compose-rightimm.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.async 
test):
* Source/JavaScriptCore/b3/B3ReduceStrength.cpp:
* Source/JavaScriptCore/b3/testb3.h:
* Source/JavaScriptCore/b3/testb3_1.cpp:
(run):
* Source/JavaScriptCore/b3/testb3_7.cpp:
(testVectorSwizzleCompositionRightImmOuter):
(runBinarySwizzleAndCheck):
(testVectorSwizzleBinaryOnlyOneSideSide0):
(testVectorSwizzleBinaryOnlyOneSideSide1):
(testVectorSwizzleBinaryOnlyOneSideSide0WithOOB):
(testVectorSwizzleBinaryOnlyOneSideSide1WithOOB):
(testVectorSwizzleBinaryOnlyOneSideAllOOB):
(testVectorSwizzleBinaryOnlyOneSideMixed):
(testVectorSwizzleBinaryOnlyOneSideSide1Scattered):
* Source/JavaScriptCore/jit/SIMDShuffle.h:
(JSC::SIMDShuffle::isOnlyOneSideMask):
(JSC::SIMDShuffle::toCanonicalUnaryPattern):
* Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::addSIMDShuffle):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp:
(JSC::Wasm::OMGIRGenerator::addSIMDShuffle):

Canonical link: https://commits.webkit.org/312648@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to