Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9355413a9415cbd472367e33453da19c9ea999cf
https://github.com/WebKit/WebKit/commit/9355413a9415cbd472367e33453da19c9ea999cf
Author: Yusuke Suzuki <[email protected]>
Date: 2026-04-14 (Tue, 14 Apr 2026)
Changed paths:
M Source/JavaScriptCore/b3/B3ReduceStrength.cpp
M Source/JavaScriptCore/b3/B3SIMDValue.cpp
M Source/JavaScriptCore/b3/testb3.h
M Source/JavaScriptCore/b3/testb3_1.cpp
M Source/JavaScriptCore/b3/testb3_7.cpp
Log Message:
-----------
[JSC] Add `VectorShr(VectorZipLower(x, x), 8)` strength reduction
https://bugs.webkit.org/show_bug.cgi?id=312308
rdar://174773227
Reviewed by Justin Michaud.
This patch adds two rules to B3 strength reduction, which detects a
pattern used in wasm to sign-extend an element to the wider lane.
Example is,
1. `VectorShr(VectorZipLower(x, x), 8)` => `VectorExtendLow(x, i16x8, Signed)`
2. `VectorShr(VectorZipHigher(x, x), 8)` => `VectorExtendHigh(x, i16x8, Signed)`
We also add SIMDValue::dumpMeta to generate more information in B3 dump.
Tests: Source/JavaScriptCore/b3/testb3_1.cpp
Source/JavaScriptCore/b3/testb3_7.cpp
* Source/JavaScriptCore/b3/B3ReduceStrength.cpp:
* Source/JavaScriptCore/b3/B3SIMDValue.cpp:
(JSC::B3::SIMDValue::dumpMeta const):
* Source/JavaScriptCore/b3/testb3.h:
* Source/JavaScriptCore/b3/testb3_1.cpp:
(run):
* Source/JavaScriptCore/b3/testb3_7.cpp:
(testVectorShrZipToExtend):
(testVectorShrZipToExtendI32):
(testVectorShrZipToExtendI64):
Canonical link: https://commits.webkit.org/311255@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications