WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
200018
Sometimes we miss removable CheckInBounds
https://bugs.webkit.org/show_bug.cgi?id=200018
Summary
Sometimes we miss removable CheckInBounds
Justin Michaud
Reported
2019-07-22 15:54:51 PDT
In the following loop: +function doTest(arr1) { + let sum = 0 + for (let i=0; i<arr1.length; ++i) { + sum += arr1[i] + } + return sum +} +noInline(doTest); + +let arr1 = new Int32Array(1000) +//let arr1 = new Array(1000) + +for (let i=0; i<1000; ++i) doTest(arr1) we should not need to emit a checkInBounds, but we do.
Attachments
Patch
(2.24 KB, patch)
2019-07-22 16:00 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Patch
(2.71 KB, patch)
2019-07-22 16:40 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Patch
(3.84 KB, patch)
2019-07-22 16:56 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Justin Michaud
Comment 1
2019-07-22 16:00:23 PDT
Created
attachment 374647
[details]
Patch
Justin Michaud
Comment 2
2019-07-22 16:40:07 PDT
Created
attachment 374652
[details]
Patch
Saam Barati
Comment 3
2019-07-22 16:47:51 PDT
Comment on
attachment 374652
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=374652&action=review
r=me
> Source/JavaScriptCore/ChangeLog:8 > + We failed to remove the CheckInBounds bounds because we did not see that the index was nonnegative. This is because we do not see the relationship between the two > + separate zero constants that appear in the IR for the given test case. This patch re-adds the hack to de-duplicate m_zero that was removed in > + <
https://trac.webkit.org/changeset/241228/webkit
>.
nit: should go below "Reviewed by ..." Might be worth also opening a bug on not being reliant on the exact node pointer. Or at least understanding why it's ok to rely on the actual node pointer value.
Saam Barati
Comment 4
2019-07-22 16:48:24 PDT
Comment on
attachment 374652
[details]
Patch Can you also add a microbenchmark if one doesn't already exist
Justin Michaud
Comment 5
2019-07-22 16:56:51 PDT
Created
attachment 374654
[details]
Patch
WebKit Commit Bot
Comment 6
2019-07-23 10:24:20 PDT
Comment on
attachment 374654
[details]
Patch Clearing flags on attachment: 374654 Committed
r247724
: <
https://trac.webkit.org/changeset/247724
>
WebKit Commit Bot
Comment 7
2019-07-23 10:24:21 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8
2019-07-23 10:25:18 PDT
<
rdar://problem/53452180
>
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