Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JIT] ARM64 - Combine cmp and shift ops into a single cmp op #84605

Merged
merged 8 commits into from
Apr 17, 2023

Conversation

TIHan
Copy link
Member

@TIHan TIHan commented Apr 11, 2023

Description

Given this example:

lsl    w1, w1, #2
cmp    w0, w1

Can be converted into a single cmp:

cmp    w0, w1, LSL #2

This PR will not include the cmn version.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 11, 2023
@ghost ghost assigned TIHan Apr 11, 2023
@ghost
Copy link

ghost commented Apr 11, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

Give this example:

lsl    w1, w1, #2
cmp    w0, w1

Can be converted into a single cmp:

cmp    w0, w1, LSL #2

This PR will not include the cmn version.

Author: TIHan
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@TIHan TIHan marked this pull request as ready for review April 13, 2023 16:55
@TIHan
Copy link
Member Author

TIHan commented Apr 13, 2023

@dotnet/jit-contrib @BruceForstall @tannergooding This is ready. CI linux formatting failure is unrelated.

@TIHan
Copy link
Member Author

TIHan commented Apr 13, 2023

Diffs

Comment on lines +10337 to +10338
NO_WAY("expected a shift-op");
return INS_OPTS_NONE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this stay unreached()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't matter as long as something fails; also the NO_WAY is more descriptive. There are similar functions doing this.

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ghost ghost locked as resolved and limited conversation to collaborators May 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants