Bug 68977 - DFG JIT falls back on numerical comparisons when it does not recognize a prediction
Summary: DFG JIT falls back on numerical comparisons when it does not recognize a pred...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-28 00:04 PDT by Filip Pizlo
Modified: 2011-09-28 17:47 PDT (History)
0 users

See Also:


Attachments
the patch (3.91 KB, patch)
2011-09-28 14:58 PDT, Filip Pizlo
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2011-09-28 00:04:29 PDT
The DFG will emit numerical comparison code (with numerical speculation) when the operands to the comparison are something that it does not have optimized code generation for.  This means that any code that tries to compare strings, for example, will fall out of the speculative path.
Comment 1 Filip Pizlo 2011-09-28 14:58:35 PDT
Created attachment 109080 [details]
the patch
Comment 2 Geoffrey Garen 2011-09-28 15:01:26 PDT
Comment on attachment 109080 [details]
the patch

r=me

Can double comparisons peephole fuse with branches?
Comment 3 Oliver Hunt 2011-09-28 15:03:06 PDT
Comment on attachment 109080 [details]
the patch

Add test cases that hit the object equality instead of correct operation case.
Comment 4 Filip Pizlo 2011-09-28 17:47:34 PDT
(In reply to comment #2)
> (From update of attachment 109080 [details])
> r=me
> 
> Can double comparisons peephole fuse with branches?

Yup.  We drop through the shouldSpeculateInteger() check, and then trigger on the shouldSpeculateNumber() check (which means are these things either double or integer, plus still some cruft from static speculation days, which I'll get rid of eventually in another patch).
Comment 5 Filip Pizlo 2011-09-28 17:47:56 PDT
Landed in r96280.