Bug 169250 - LowerToAir should recognize subwidth variants of Equal(StrongCAS...)
Summary: LowerToAir should recognize subwidth variants of Equal(StrongCAS...)
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-06 20:02 PST by Filip Pizlo
Modified: 2017-03-06 20:02 PST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2017-03-06 20:02:31 PST
We currently don't turn Equal(StrongCAS...) into a direct branch on the CAS result for Width8 and Width16.  We can do it.  We'd have to match patterns like:

Equal(SExt8(StrongCAS(@exp, ...)), SExt8(@exp))

and

Equal(SExt8(StrongCAS(BitAnd(@exp, 0xff), ...)), SExt8(@exp))

Where the right-hand SExt8 is matched with sharing.

It's not super obvious how profitable this optimization will be, particularly if we have any optimizations that turn strong CAS into weak CAS.