Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 99bafdf6e24aa667caf8a518455bff9d2e72ab64
https://github.com/WebKit/WebKit/commit/99bafdf6e24aa667caf8a518455bff9d2e72ab64
Author: Yusuke Suzuki <[email protected]>
Date: 2026-03-15 (Sun, 15 Mar 2026)
Changed paths:
M Source/JavaScriptCore/b3/B3ReduceSIMDShuffle.cpp
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
Log Message:
-----------
[JSC] Optimize B3 SIMD shuffle more
https://bugs.webkit.org/show_bug.cgi?id=309942
rdar://172533561
Reviewed by Justin Michaud.
1. Add unary EXT detection. Byte rotation patterns {k, k+1, ..., 15, 0, ...,
k-1}
are now recognized for all offsets 1-15 and lowered to VectorExtractPair
(ext)
instead of tbl.
2. Extend shuffle composition in B3ReduceSIMDShuffle.
- Added unary-of-unary composition. VectorSwizzle(VectorSwizzle(x, pat1),
pat2)
is composed into a single VectorSwizzle(x, composed_pat). This enables
chained
rotations like EXT4(EXT4(x)) to fold into EXT8(x), then get lowered to a
single ext instruction.
- Relaxed the single-use restriction on inner shuffles for binary(unary())
composition. Composition replaces only the outer node, the inner survives
for
other consumers and DCE removes it if all uses are composed away.
Tests: Source/JavaScriptCore/b3/testb3_1.cpp
Source/JavaScriptCore/b3/testb3_7.cpp
* Source/JavaScriptCore/b3/B3ReduceSIMDShuffle.cpp:
* Source/JavaScriptCore/b3/B3ReduceStrength.cpp:
* Source/JavaScriptCore/b3/testb3.h:
* Source/JavaScriptCore/b3/testb3_1.cpp:
(run):
* Source/JavaScriptCore/b3/testb3_7.cpp:
(testVectorSwizzleUnaryToEXT):
(testVectorSwizzleUnaryComposition):
(testVectorSwizzleCompositionMultiUse):
* Source/JavaScriptCore/jit/SIMDShuffle.h:
(JSC::SIMDShuffle::isUnaryEXT):
(JSC::SIMDShuffle::composeUnaryShuffle):
Canonical link: https://commits.webkit.org/309299@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications