Skip to content

JIT: Enable fgOptimizeRelationalComparisonWithCasts for EQ/NE#128091

Open
BoyBaykiller wants to merge 8 commits into
dotnet:mainfrom
BoyBaykiller:fgOptimizeRelationalComparisonWithCasts-for-EQ-NE
Open

JIT: Enable fgOptimizeRelationalComparisonWithCasts for EQ/NE#128091
BoyBaykiller wants to merge 8 commits into
dotnet:mainfrom
BoyBaykiller:fgOptimizeRelationalComparisonWithCasts-for-EQ-NE

Conversation

@BoyBaykiller
Copy link
Copy Markdown
Contributor

We were previously only calling that for GT_LT, GT_LE, GT_GE, GT_GT.
Example:

bool Test(uint a)
{
    return (ulong)(a) == uint.MaxValue;
}
;; ------ BASE
G_M000_IG02:
       mov      eax, edx
       mov      ecx, 0xFFFFFFFF
       cmp      rax, rcx
       sete     al
       movzx    rax, al

;; ------ DIFF
G_M60965_IG02:
       cmp      edx, -1
       sete     al
       movzx    rax, al

Currently includes #127883 which should be merged first.

@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 May 12, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label May 12, 2026
@dotnet-policy-service
Copy link
Copy Markdown
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