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 'neg' and 'cmp' to 'cmn' #84667

Merged
merged 15 commits into from
Apr 21, 2023

Conversation

TIHan
Copy link
Member

@TIHan TIHan commented Apr 11, 2023

Description

Part of the work for #68028

Handles the following ARM64 multi-op optimizations, with examples:

  1. neg, cmp => cmn
neg x1, x1
cmp x1, x0

to

cmn x0, x1

  1. lsr/asr/lsl, neg => neg (shifted)
lsr/asr/lsl w0, w0, #1
neg         w0, w0

to

neg w0, w0, LSR/ASR/LSL #1

  1. lsr/asr/lsl, neg, cmp => cmn (shifted)
lsr/asr/lsl w1, w1, #2
neg         w1, w1
cmp         w1, w0

to

cmn w0, w1, LSR/ASR/LSL #2

@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

Requires #84605 to be merged first.

Author: TIHan
Assignees: TIHan
Labels:

area-CodeGen-coreclr

Milestone: -

@TIHan TIHan marked this pull request as ready for review April 18, 2023 00:59
@TIHan
Copy link
Member Author

TIHan commented Apr 18, 2023

@dotnet/jit-contrib This is ready. @BruceForstall // cc - pending CI

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.

One question

src/coreclr/jit/lower.cpp Outdated Show resolved Hide resolved
@BruceForstall
Copy link
Member

Diffs

@TIHan TIHan closed this Apr 21, 2023
@TIHan TIHan reopened this Apr 21, 2023
@TIHan TIHan merged commit bd32598 into dotnet:main Apr 21, 2023
@TIHan TIHan deleted the arm64-compare-neg-containment branch April 21, 2023 16:49
@ghost ghost locked as resolved and limited conversation to collaborators May 21, 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.

2 participants