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: Redundant sign extension for checked bound #111304

Open
EgorBo opened this issue Jan 11, 2025 · 1 comment · May be fixed by #111305
Open

JIT: Redundant sign extension for checked bound #111304

EgorBo opened this issue Jan 11, 2025 · 1 comment · May be fixed by #111305
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@EgorBo
Copy link
Member

EgorBo commented Jan 11, 2025

From #111112 (comment) cc @pentp

static ulong Foo1(int x)
{
    if ((uint)x < 10)
    {
        return (ulong)x << 60;
    }
    return 0;
}
C.Foo1(Int32)
    L0000: xor eax, eax
    L0002: movsxd rdx, ecx  <----
    L0005: shl rdx, 0x3c
    L0009: cmp ecx, 0xa
    L000c: cmovb rax, rdx
    L0010: ret
@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 11, 2025
@EgorBo EgorBo self-assigned this Jan 11, 2025
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jan 11, 2025
@EgorBo EgorBo added this to the 10.0.0 milestone Jan 11, 2025
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Jan 11, 2025
Copy link
Contributor

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

@EgorBo EgorBo linked a pull request Jan 11, 2025 that will close this issue
@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Jan 11, 2025
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 in-pr There is an active PR which will close this issue when it is merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant