Skip to content

Conversation

jonathandavies-arm
Copy link
Contributor

- Fixes dotnet#83562
- Add tests for previous work
- Add tbz/tbnz support for short and sbyte
@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 13, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Oct 13, 2025
@am11
Copy link
Member

am11 commented Oct 14, 2025

cc @tomeksowi, in case this opt is interesting for riscv64. :)

Comment on lines 4566 to 4572
LIR::Use use;
op1Type = cast->gtCastType;
GenTree* castOp = cast->CastOp();
BlockRange().TryGetUse(cast, &use);
use.ReplaceWith(castOp);
BlockRange().Remove(cast);
relopOp1 = castOp;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
LIR::Use use;
op1Type = cast->gtCastType;
GenTree* castOp = cast->CastOp();
BlockRange().TryGetUse(cast, &use);
use.ReplaceWith(castOp);
BlockRange().Remove(cast);
relopOp1 = castOp;
op1Type = cast->gtCastType;
GenTree* castOp = cast->CastOp();
cond->AsOp()->gtOp1 = castOp;
BlockRange().Remove(cast);
relopOp1 = castOp;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-arm64 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.

ARM64 - Follow-up on x < 0 and x >= 0

3 participants