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

Improve compare-and-branch sequences produced by Emitter #111797

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

snickolls-arm
Copy link
Contributor

Introduces an overload of genJumpToThrowHlpBlk that allows you to pass a function that generates the branch code, before it creates an inline throw block. This allows us to choose compare-and-branch sequences such as cbz on ARM64 for checks added in the emitter, such as divide-by-zero.

Working towards #68028, I'll be looking into something similar for #42514 next using this helper I've added.

<==
cmp     w1, #0
beq     G_M17037_IG05
==>
cbz     w1, G_M17037_IG05

Introduces an overload of `genJumpToThrowHlpBlk` that allows you to pass
a function that generates the branch code, before it creates an inline
throw block. This allows us to choose compare-and-branch sequences such
as `cbz` on ARM64 for checks added in the emitter, such as divide-by-zero.
@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 Jan 24, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 24, 2025
@snickolls-arm
Copy link
Contributor Author

@a74nh @kunalspathak

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant