Bug 263390

Summary: Don't emit shifts in macro assembler when shift amount is zero
Product: WebKit Reporter: David Degazio <d_degazio>
Component: JavaScriptCoreAssignee: David Degazio <d_degazio>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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.