Bug 196328

Summary: B3ReduceStrength should mask large constants used in a shift
Product: WebKit Reporter: Robin Morisset <rmorisset>
Component: JavaScriptCoreAssignee: Robin Morisset <rmorisset>
Status: NEW ---    
Severity: Trivial CC: ews-watchlist, keith_miller, mark.lam, msaboff, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 196361    
Attachments:
Description Flags
Patch rmorisset: review?

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