Bug 196328 - B3ReduceStrength should mask large constants used in a shift
Summary: B3ReduceStrength should mask large constants used in a shift
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Trivial
Assignee: Robin Morisset
URL:
Keywords:
Depends on:
Blocks: 196361
  Show dependency treegraph
 
Reported: 2019-03-27 16:53 PDT by Robin Morisset
Modified: 2019-03-28 12:46 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.32 KB, patch)
2019-03-27 16:58 PDT, Robin Morisset
rmorisset: review?
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Morisset 2019-03-27 16:53:07 PDT
The semantics of all shifts in B3 include a mask with either 31 or 63.
So if we do a shift by a constant greater than that, we should do the mask directly on the constant.
This would provide some useful canonicalization, reduce the need to materialize large constants, and could outright delete the shift if after the mask the constant is 0.
Comment 1 Robin Morisset 2019-03-27 16:58:36 PDT
Created attachment 366129 [details]
Patch