JIT: Switch GetElement and WithElement to native sized indices#118990
JIT: Switch GetElement and WithElement to native sized indices#118990jakobbotsch merged 14 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
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
NormalizeIndexToNativeSizedhelper 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 |
|
/backport to release/10.0 |
|
Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/17293482582 |
|
@jakobbotsch backporting to "release/10.0" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: JIT: Switch GetElement and WithElement to native sized indices
Using index info to reconstruct a base tree...
M src/coreclr/jit/decomposelongs.cpp
M src/coreclr/jit/gentree.cpp
M src/coreclr/jit/hwintrinsic.cpp
M src/coreclr/jit/hwintrinsicarm64.cpp
M src/coreclr/jit/hwintrinsiccodegenxarch.cpp
M src/coreclr/jit/hwintrinsicxarch.cpp
M src/coreclr/jit/lowerxarch.cpp
M src/coreclr/jit/valuenum.cpp
Falling back to patching base and 3-way merge...
Auto-merging src/coreclr/jit/decomposelongs.cpp
CONFLICT (content): Merge conflict in src/coreclr/jit/decomposelongs.cpp
Auto-merging src/coreclr/jit/gentree.cpp
Auto-merging src/coreclr/jit/hwintrinsic.cpp
Auto-merging src/coreclr/jit/hwintrinsicarm64.cpp
Auto-merging src/coreclr/jit/hwintrinsiccodegenxarch.cpp
Auto-merging src/coreclr/jit/hwintrinsicxarch.cpp
Auto-merging src/coreclr/jit/lowerxarch.cpp
Auto-merging src/coreclr/jit/valuenum.cpp
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 JIT: Switch GetElement and WithElement to native sized indices
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
Fix #118974