Bug 263390 - Don't emit shifts in macro assembler when shift amount is zero
Summary: Don't emit shifts in macro assembler when shift amount is zero
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Degazio
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-10-19 12:42 PDT by David Degazio
Modified: 2023-10-20 17:51 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Degazio 2023-10-19 12:42:40 PDT
rdar://117220277

When generating a shift or rotation in the JSC macro assembler, we should check if the shift amount is zero, and either emit nothing or emit a move in that case. Even though we can check for this pattern during compiler optimizations, it's probably best to check in the macro assembler anyway so we still handle places where the macro assembler is used directly (baseline JITs, inline caches, various assembly helpers).
Comment 1 David Degazio 2023-10-19 12:47:32 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19291
Comment 2 EWS 2023-10-20 17:51:42 PDT
Committed 269608@main (003f045ae01b): <https://commits.webkit.org/269608@main>

Reviewed commits have been landed. Closing PR #19291 and removing active labels.