Bug 64659

Summary: DFG JIT does not optimize equal-null comparisons and branches
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, fpizlo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch none

Description Filip Pizlo 2011-07-16 16:20:13 PDT
The DFG JIT bytecode parser converts equal-null compare/branch opcodes into a tree of JSConstant(null), an equality comparison, and a branch.  The backend never special-cases the equal-to-null case, and treats it as a normal equality comparison; this means that equal-null always takes slow path.  The DFG JIT backend should have a peephole optimization for this case.
Comment 1 Filip Pizlo 2011-07-18 10:29:42 PDT
Created attachment 101170 [details]
the patch
Comment 2 WebKit Review Bot 2011-07-18 14:05:03 PDT
Comment on attachment 101170 [details]
the patch

Clearing flags on attachment: 101170

Committed r91208: <http://trac.webkit.org/changeset/91208>
Comment 3 WebKit Review Bot 2011-07-18 14:05:07 PDT
All reviewed patches have been landed.  Closing bug.