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.
Created attachment 109080 [details] the patch
Comment on attachment 109080 [details] the patch r=me Can double comparisons peephole fuse with branches?
Comment on attachment 109080 [details] the patch Add test cases that hit the object equality instead of correct operation case.
(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).
Landed in r96280.