-
Notifications
You must be signed in to change notification settings - Fork 5.1k
JIT: Switch GetElement and WithElement to native sized indices #118990
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
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes JIT compiler issue #118974 by updating SIMD GetElement
and WithElement
intrinsics to use native-sized indices for address calculations. The change ensures consistency across platforms and prevents potential issues with 32-bit indices on 64-bit systems.
Key changes:
- Added normalization of indices to native size before address calculations
- Introduced
NormalizeIndexToNativeSized
helper method for type conversion - Updated both x86/x64 and ARM architectures to use consistent index handling
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/coreclr/jit/lower.h | Added declaration for NormalizeIndexToNativeSized helper method |
src/coreclr/jit/lower.cpp | Implemented NormalizeIndexToNativeSized method to convert indices to native size |
src/coreclr/jit/lowerxarch.cpp | Updated GetElement and WithElement lowering to normalize indices on x86/x64 |
src/coreclr/jit/lowerarmarch.cpp | Updated GetElement lowering to normalize indices on ARM |
src/coreclr/jit/hwintrinsiccodegenxarch.cpp | Added assertions to verify indices are native-sized during code generation |
Fix #118974