Skip to content

JIT: Change IntegralRange to handle arbitrary int64_t#127675

Open
BoyBaykiller wants to merge 1 commit into
dotnet:mainfrom
BoyBaykiller:integral-range-int
Open

JIT: Change IntegralRange to handle arbitrary int64_t#127675
BoyBaykiller wants to merge 1 commit into
dotnet:mainfrom
BoyBaykiller:integral-range-int

Conversation

@BoyBaykiller
Copy link
Copy Markdown
Contributor

@BoyBaykiller BoyBaykiller commented May 2, 2026

Comment on IntegralRange says:

// Represents an integral range useful for reasoning about integral casts.
// It uses a symbolic representation for lower and upper bounds so
// that it can efficiently handle integers of all sizes on all hosts.

Yet when I change it to use plain int64_t the tp diffs are negligible.

This change will allows us to tighten ranges and potentially enable some optimizations.
The very reason I did this is to be able to handle #126529 (comment)
And just overall its the more natural thing.

@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 2, 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 2, 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.

@EgorBo
Copy link
Copy Markdown
Member

EgorBo commented Jun 3, 2026

@BoyBaykiller can you fix the conflict?

This change will allows us to tighten ranges and potentially enable some optimizations.

TBH, I'd prefer to slowly move away from IntegralRange and do everything on the VN level

@BoyBaykiller
Copy link
Copy Markdown
Contributor Author

TBH, I'd prefer to slowly move away from IntegralRange and do everything on the VN level

Do you mean using existing GetRangeFromAssertions or similar to get range info? Cause VNs alone don't get us range info?
But ye, I also support moving away from IntegralRange 👍

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.

2 participants