-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add special cases in the x64 emit_cmp helper #5869
Copy link
Copy link
Closed
Labels
cranelift:E-easyIssues suitable for newcomers to investigate, including Rust newcomers!Issues suitable for newcomers to investigate, including Rust newcomers!cranelift:area:x64Issues related to x64 codegenIssues related to x64 codegengood first issueIssues that are good for new contributors to tackle!Issues that are good for new contributors to tackle!
Metadata
Metadata
Assignees
Labels
cranelift:E-easyIssues suitable for newcomers to investigate, including Rust newcomers!Issues suitable for newcomers to investigate, including Rust newcomers!cranelift:area:x64Issues related to x64 codegenIssues related to x64 codegengood first issueIssues that are good for new contributors to tackle!Issues that are good for new contributors to tackle!
Feature
The x64 backend has a helper named
emit_cmpininst.islethat is used when emitting comparisons. Currently it will always usex64_cmpto emit the comparison, but for cases of equality comparisons with0,x64_testwould be a better choice. Additionally, theselectlowering does not useemit_cmpright now, and could be refactored to do so with this change in place.Benefit
This will generate better code for cases where
emit_cmpis used to compile a use oficmpin the x64 backend.