Bug 226599 - [FTL] Have a more generic fast path for compareStrictEq on Untyped/Untyped in FTLLowerDFGToB3
Summary: [FTL] Have a more generic fast path for compareStrictEq on Untyped/Untyped in...
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Robin Morisset
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-03 14:41 PDT by Robin Morisset
Modified: 2021-06-10 14:42 PDT (History)
8 users (show)

See Also:


Attachments
Patch (18.93 KB, patch)
2021-06-03 15:05 PDT, Robin Morisset
rmorisset: review?
rmorisset: commit-queue?
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Morisset 2021-06-03 14:41:04 PDT
There is already such a path in the DFG, so currently the FTL is producing worse code than the DFG in this instance.
Comment 1 Robin Morisset 2021-06-03 14:59:37 PDT
Technically there already is a fast path, but only for Int32/Int32.
Comment 2 Robin Morisset 2021-06-03 15:05:27 PDT
Created attachment 430505 [details]
Patch
Comment 3 Filip Pizlo 2021-06-03 16:17:31 PDT
Comment on attachment 430505 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=430505&action=review

> Source/JavaScriptCore/ChangeLog:23
> +        if (isCell(left) && isCell(right))

Isn't the thing that requires the slow path that both left and right are either strings or bigints?
Comment 4 Robin Morisset 2021-06-03 16:34:16 PDT
Comment on attachment 430505 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=430505&action=review

>> Source/JavaScriptCore/ChangeLog:23
>> +        if (isCell(left) && isCell(right))
> 
> Isn't the thing that requires the slow path that both left and right are either strings or bigints?

Yes, but checking whether a Cell is either a HeapBigInt or a String would be quite a bit of code, so I am approximating here (going to the slow path even for things like Object == Object).
Note that I use the more precise condition when it comes to pruning that check with the abstract interpreter (so if we can prove it is Object == Object, we'll generate the ideal code without all of these checks).
Comment 5 Radar WebKit Bug Importer 2021-06-10 14:42:26 PDT
<rdar://problem/79161356>