WebKit Bugzilla
Attachment 361468 Details for
Bug 194420
: Fix Abs(Neg(x)) -> Abs(x) optimization in B3ReduceStrength
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
Patch_194420 (text/plain), 2.23 KB, created by
Robin Morisset
on 2019-02-07 16:35:22 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Robin Morisset
Created:
2019-02-07 16:35:22 PST
Size:
2.23 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 241169) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2019-02-07 Robin Morisset <rmorisset@apple.com> >+ >+ Fix Abs(Neg(x)) -> Abs(x) optimization in B3ReduceStrength >+ https://bugs.webkit.org/show_bug.cgi?id=194420 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In https://bugs.webkit.org/show_bug.cgi?id=194250, I added an optimization: Abs(Neg(x)) -> Abs(x). >+ But I introduced two bugs, one is that I actually implemented Abs(Neg(x)) -> x, and the other is that the test is looking at Abs(Abs(x)) instead (both were stupid copy-paste mistakes). >+ This trivial patch fixes both. >+ >+ * b3/B3ReduceStrength.cpp: >+ * b3/testb3.cpp: >+ (JSC::B3::testAbsNegArg): >+ > 2019-02-07 Mark Lam <mark.lam@apple.com> > > Fix more doesGC() for CheckTraps, GetMapBucket, and Switch nodes. >Index: Source/JavaScriptCore/b3/B3ReduceStrength.cpp >=================================================================== >--- Source/JavaScriptCore/b3/B3ReduceStrength.cpp (revision 241128) >+++ Source/JavaScriptCore/b3/B3ReduceStrength.cpp (working copy) >@@ -1241,7 +1241,8 @@ > // Turn this: Abs(Neg(value)) > // Into this: Abs(value) > if (m_value->child(0)->opcode() == Neg) { >- replaceWithIdentity(m_value->child(0)->child(0)); >+ m_value->child(0) = m_value->child(0)->child(0); >+ m_changed = true; > break; > } > >Index: Source/JavaScriptCore/b3/testb3.cpp >=================================================================== >--- Source/JavaScriptCore/b3/testb3.cpp (revision 241128) >+++ Source/JavaScriptCore/b3/testb3.cpp (working copy) >@@ -3984,7 +3984,7 @@ > { > Procedure proc; > BasicBlock* root = proc.addBlock(); >- Value* neg = root->appendNew<Value>(proc, Abs, Origin(), >+ Value* neg = root->appendNew<Value>(proc, Neg, Origin(), > root->appendNew<ArgumentRegValue>(proc, Origin(), FPRInfo::argumentFPR0)); > Value* abs = root->appendNew<Value>(proc, Abs, Origin(), neg); > root->appendNewControlValue(proc, Return, Origin(), abs);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194420
: 361468