Bug 264984
Summary: | [JSC] Refine B3 and masm tests for EXTR pattern detection and application | ||
---|---|---|---|
Product: | WebKit | Reporter: | Yijia Huang <yijia_huang> |
Component: | JavaScriptCore | Assignee: | Yijia Huang <yijia_huang> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Yijia Huang
Also need to add these test cases.
--- a/Source/JavaScriptCore/b3/testb3_2.cpp
+++ b/Source/JavaScriptCore/b3/testb3_2.cpp
@@ -4883,7 +4883,7 @@ void testExtractRegister32()
{
if (JSC::Options::defaultB3OptLevel() < 2)
return;
- Vector<uint32_t> lowWidths = { 0, 17, 31 };
+ Vector<uint32_t> lowWidths = { 0, 17, 31, 32 };
// Test Pattern: ((n & mask1) << highWidth) | ((m & mask2) >> lowWidth)
// Where: highWidth = datasize - lowWidth
@@ -4915,7 +4915,7 @@ void testExtractRegister32()
root->appendNew<Value>(proc, BitOr, Origin(), left, right));
auto code = compileProc(proc);
- if (isARM64() && lowWidth > 0)
+ if (isARM64() && 0 < lowWidth && lowWidth < 32)
checkUsesInstruction(*code, "extr");
return invoke<uint32_t>(*code, n, m);
};
@@ -4943,7 +4943,7 @@ void testExtractRegister64()
{
if (JSC::Options::defaultB3OptLevel() < 2)
return;
- Vector<uint64_t> lowWidths = { 0, 34, 63 };
+ Vector<uint64_t> lowWidths = { 0, 34, 63, 64 };
// Test Pattern: ((n & mask1) << highWidth) | ((m & mask2) >> lowWidth)
// Where: highWidth = datasize - lowWidth
@@ -4971,7 +4971,7 @@ void testExtractRegister64()
root->appendNew<Value>(proc, BitOr, Origin(), left, right));
auto code = compileProc(proc);
- if (isARM64() && lowWidth > 0)
+ if (isARM64() && 0 < lowWidth && lowWidth < 64)
checkUsesInstruction(*code, "extr");
return invoke<uint64_t>(*code, n, m);
};
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/118532295>
Yijia Huang
Pull request: https://github.com/WebKit/WebKit/pull/23820
EWS
Committed 274149@main (084df28f4fc4): <https://commits.webkit.org/274149@main>
Reviewed commits have been landed. Closing PR #23820 and removing active labels.