[webkit-reviews] review granted: [Bug 228068] Compiler Incorrect Optimization : [Attachment 433828] proposed patch.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 19 15:35:10 PDT 2021


Yusuke Suzuki <ysuzuki at apple.com> has granted Mark Lam <mark.lam at apple.com>'s
request for review:
Bug 228068: Compiler Incorrect Optimization
https://bugs.webkit.org/show_bug.cgi?id=228068

Attachment 433828: proposed patch.

https://bugs.webkit.org/attachment.cgi?id=433828&action=review




--- Comment #3 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 433828
  --> https://bugs.webkit.org/attachment.cgi?id=433828
proposed patch.

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

> Source/JavaScriptCore/dfg/DFGOperations.cpp:206
> +    if (static_cast<double>(asInt) == input) {
> +	   if (asInt || !std::signbit(input))

I think it is worth putting `LIKELY`.

if (LIKELY(static_cast<double>(asInt) == input && (asInt ||
!std::signbit(input))))
    return JSValue::encode(jsNumber(asInt));


More information about the webkit-reviews mailing list