[webkit-changes] [WebKit/WebKit] 4d69e9: [JSC] Optimize Compare + SShr
Yusuke Suzuki
noreply at github.com
Fri Sep 20 09:52:08 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4d69e9711e0914814e5f680812aff39356cc1f6f
https://github.com/WebKit/WebKit/commit/4d69e9711e0914814e5f680812aff39356cc1f6f
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2024-09-20 (Fri, 20 Sep 2024)
Changed paths:
M Source/JavaScriptCore/b3/B3Const32Value.cpp
M Source/JavaScriptCore/b3/B3ReduceStrength.cpp
M Source/JavaScriptCore/b3/B3Validate.cpp
M Source/JavaScriptCore/b3/testb3.h
M Source/JavaScriptCore/b3/testb3_1.cpp
M Source/JavaScriptCore/b3/testb3_8.cpp
Log Message:
-----------
[JSC] Optimize Compare + SShr
https://bugs.webkit.org/show_bug.cgi?id=280046
rdar://136347499
Reviewed by Yijia Huang.
We found that particular pattern like AboveEqual(SShr(@x, 2), constant)
is frequently emitted in some JavaScript code. This patch attempts to
convert it to AboveEqual(@x, constant << 2) when constant and
shift-amount are within the safe range.
For now, we only support Above/Below/AboveEqual/BelowEqual. In the
future, we would like to expand it to GreaterThan etc. Also we would
like to support other shift operations too.
* Source/JavaScriptCore/b3/B3Const32Value.cpp:
(JSC::B3::Const32Value::aboveConstant const):
(JSC::B3::Const32Value::belowEqualConstant const):
* Source/JavaScriptCore/b3/B3ReduceStrength.cpp:
* Source/JavaScriptCore/b3/testb3.h:
(v128Operands):
(int64Operands):
(int64OperandsMore):
(int32Operands):
(int32OperandsMore):
(int16Operands):
(int8Operands):
* Source/JavaScriptCore/b3/testb3_1.cpp:
(run):
* Source/JavaScriptCore/b3/testb3_8.cpp:
(testSShrCompare32):
(testSShrCompare64):
Canonical link: https://commits.webkit.org/283990@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list