WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
151474
[JSC] Add Air lowering to BitNot() for Xor(value, -1)
https://bugs.webkit.org/show_bug.cgi?id=151474
Summary
[JSC] Add Air lowering to BitNot() for Xor(value, -1)
Benjamin Poulain
Reported
2015-11-19 18:55:28 PST
[JSC] Add B3 BitNot and Strength Reduction
Attachments
Patch
(26.50 KB, patch)
2015-11-19 18:56 PST
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Patch
(18.48 KB, patch)
2015-11-19 19:54 PST
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Patch
(18.52 KB, patch)
2015-11-20 12:23 PST
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Patch
(19.21 KB, patch)
2015-11-20 13:07 PST
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Benjamin Poulain
Comment 1
2015-11-19 18:56:32 PST
Created
attachment 265927
[details]
Patch
Filip Pizlo
Comment 2
2015-11-19 19:18:11 PST
Comment on
attachment 265927
[details]
Patch We don't need a new opcode for this. BitNot(x) is just BitXor(x, -1). I don't think it's useful to have a BitNot instruction when BitXor with an immediate serves the same purpose. Also, it would be weird to have BitNot but not Neg - Neg is currently handled using Sub(0, x), sort of like how I'm proposing to handle Not using Xor.
Benjamin Poulain
Comment 3
2015-11-19 19:51:24 PST
(In reply to
comment #2
)
> Comment on
attachment 265927
[details]
> Patch > > We don't need a new opcode for this. BitNot(x) is just BitXor(x, -1). I > don't think it's useful to have a BitNot instruction when BitXor with an > immediate serves the same purpose. Also, it would be weird to have BitNot > but not Neg - Neg is currently handled using Sub(0, x), sort of like how I'm > proposing to handle Not using Xor.
Yep, that's a better idea.
Benjamin Poulain
Comment 4
2015-11-19 19:54:32 PST
Created
attachment 265934
[details]
Patch
Filip Pizlo
Comment 5
2015-11-19 22:31:26 PST
Comment on
attachment 265934
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=265934&action=review
> Source/JavaScriptCore/b3/B3LowerToAir.cpp:1319 > + appendUnOp<Not32, Not64, Air::Oops>(m_value->child(0));
this is missing a break statement. ;-)
Benjamin Poulain
Comment 6
2015-11-20 12:23:52 PST
Created
attachment 265979
[details]
Patch
Filip Pizlo
Comment 7
2015-11-20 12:44:54 PST
Comment on
attachment 265979
[details]
Patch Don't forget the Store(Not(Load)) case.
Benjamin Poulain
Comment 8
2015-11-20 13:07:38 PST
Created
attachment 265981
[details]
Patch
Benjamin Poulain
Comment 9
2015-11-20 14:07:08 PST
Comment on
attachment 265981
[details]
Patch Clearing flags on attachment: 265981 Committed
r192696
: <
http://trac.webkit.org/changeset/192696
>
Benjamin Poulain
Comment 10
2015-11-20 14:07:12 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug