-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JSC] Refine B3 and masm tests for EXTR pattern detection and application #23820
[JSC] Refine B3 and masm tests for EXTR pattern detection and application #23820
Conversation
EWS run on previous version of this PR (hash c5a6b63) |
c5a6b63
to
5894357
Compare
EWS run on previous version of this PR (hash 5894357) |
5894357
to
3959022
Compare
EWS run on previous version of this PR (hash 3959022) |
3959022
to
ac3e0fa
Compare
EWS run on previous version of this PR (hash ac3e0fa) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with nits.
|
||
root->appendNewControlValue( | ||
proc, Return, Origin(), | ||
root->appendNew<Value>(proc, BitOr, Origin(), left, right)); | ||
|
||
auto code = compileProc(proc); | ||
if (isARM64() && lowWidth > 0) | ||
if (checkEmittedEXTR && isARM64() && 0 < lowWidth && lowWidth < 32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have checkEmittedEXTR
? Shouldn't we always be checking for the instruction when we think we should have it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certain lowWidth
values can trigger other optimizations in B3ReduceStrength.cpp
, which can break this EXTR
pattern. Then, checkEmittedEXTR
is introduced since not every test case can emit EXTR
.
|
||
root->appendNewControlValue( | ||
proc, Return, Origin(), | ||
root->appendNew<Value>(proc, BitOr, Origin(), left, right)); | ||
|
||
auto code = compileProc(proc); | ||
if (isARM64() && lowWidth > 0) | ||
if (checkEmittedEXTR && isARM64() && 0 < lowWidth && lowWidth < 64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certain lowWidth
values can trigger other optimizations in B3ReduceStrength.cpp
, which can break this EXTR
pattern. Then, checkEmittedEXTR
is introduced since not every test case can emit EXTR
.
ac3e0fa
to
2bec550
Compare
EWS run on current version of this PR (hash 2bec550) |
β¦tion https://bugs.webkit.org/show_bug.cgi?id=264984 rdar://118532295 Reviewed by Keith Miller. Previously we introduced the pattern detection and application of EXTR when B3 is lowering to AIR. This patch does two things: 1. Refine the corresponding B3 and masm tests for EXTR. 2. Add a sanity check and more comments for EXTR pattern detection and application in B3. * Source/JavaScriptCore/assembler/testmasm.cpp: (JSC::testExtractRegister32): (JSC::testExtractRegister64): * Source/JavaScriptCore/b3/B3LowerToAir.cpp: * Source/JavaScriptCore/b3/testb3_2.cpp: (testExtractRegister32): (testExtractRegister64): Canonical link: https://commits.webkit.org/274149@main
2bec550
to
084df28
Compare
Committed 274149@main (084df28): https://commits.webkit.org/274149@main Reviewed commits have been landed. Closing PR #23820 and removing active labels. |
084df28
2bec550