-
Notifications
You must be signed in to change notification settings - Fork 5k
Vector128.WithElement codegen regression in .NET 9.0 #115348
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
Merged
kunalspathak
merged 10 commits into
dotnet:main
from
kendall1997:Kendall/Vector128.WithElement
May 8, 2025
+74
−86
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a7d647e
JIT: Enhance range checking for SIMD element node creation for non co…
kendall1997 a6cbb1c
JIT: Enhance handling of non-constant index in LowerHWIntrinsicWithEl…
kendall1997 65b4dc8
JIT: Remove conditional handling for non-constant index that caused a…
kendall1997 7179450
JIT: Optimize handling of non-constant index for SIMD WithElement
kendall1997 c55a160
JIT: Comment out handling for NI_Vector128_WithElement in RewriteHWIn…
kendall1997 78829fc
JIT: Update instruction for storing SIMD values to use emitIns_ARX_R …
kendall1997 b2bd49e
JIT: Remove handling for NI_Vector*_WithElement and related SIMD case…
kendall1997 25a7069
Merge remote-tracking branch 'origin' into Kendall/Vector128.WithElement
kendall1997 50329c2
JIT: Assert op2 is not a constant for Vector*_WithElement and fix sto…
kendall1997 e2e118e
JIT: Remove if checking because of the previous assert
kendall1997 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5653,7 +5653,14 @@ GenTree* Lowering::LowerHWIntrinsicWithElement(GenTreeHWIntrinsic* node) | |
GenTree* op2 = node->Op(2); | ||
GenTree* op3 = node->Op(3); | ||
|
||
assert(op2->OperIsConst()); | ||
if (!op2->OperIsConst()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding an inline comment explaining why a SIMD initialization temp variable is obtained when op2 is not a constant for improved clarity. Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
{ | ||
comp->getSIMDInitTempVarNum(simdType); | ||
|
||
// We will specially handle WithElement in codegen when op2 isn't a constant | ||
ContainCheckHWIntrinsic(node); | ||
return node->gtNext; | ||
} | ||
|
||
ssize_t count = simdSize / genTypeSize(simdBaseType); | ||
ssize_t imm8 = op2->AsIntCon()->IconValue(); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Add an explanatory comment regarding the rationale for using 'getSIMDVectorLength(simdSize, simdBaseType) - 1' as the upper bound to aid future maintainability.
Copilot uses AI. Check for mistakes.