Bug 72054 - Could round rather than truncate in compileClampDoubleToByte?
Summary: Could round rather than truncate in compileClampDoubleToByte?
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Miller
URL:
Keywords: InRadar
Depends on: 260534
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-10 13:48 PST by Gavin Barraclough
Modified: 2023-08-22 11:21 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2011-11-10 13:48:43 PST
There is a +0.5 followed by truncate in the DFG JIT, may be able to replace this with a round.
Comment 1 Ahmad Saleem 2022-07-21 14:37:31 PDT
https://github.com/WebKit/WebKit/blob/main/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp#L3555

It is still present in the Source Code.
Comment 2 Keith Miller 2023-08-11 10:29:07 PDT
This also has the wrong semantics. It should be a round to nearest not a round to infinity. Uploading a patch now.
Comment 3 Keith Miller 2023-08-11 10:34:06 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16609
Comment 4 EWS 2023-08-21 11:56:55 PDT
Committed 267100@main (c55d0673236c): <https://commits.webkit.org/267100@main>

Reviewed commits have been landed. Closing PR #16609 and removing active labels.
Comment 5 Radar WebKit Bug Importer 2023-08-21 11:57:16 PDT
<rdar://problem/114208146>
Comment 6 WebKit Commit Bot 2023-08-22 11:21:36 PDT
Re-opened since this is blocked by bug 260534