-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Fix a couple issues with Vector128.Get/WithElement #52985
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
Changes from all commits
8c2a5b1
241aa5d
765d171
d9bd42e
1a4e854
b7c8926
d11612c
539e7ae
1616c16
ff9cc27
ba55519
1b41e6f
4f08fc6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -217,9 +217,18 @@ class Lowering final : public Phase | |||||||||||||||||
| GenTree* oldUseNode = use.Def(); | ||||||||||||||||||
| if ((oldUseNode->gtOper != GT_LCL_VAR) || (tempNum != BAD_VAR_NUM)) | ||||||||||||||||||
| { | ||||||||||||||||||
| use.ReplaceWithLclVar(comp, tempNum); | ||||||||||||||||||
| GenTree* assign; | ||||||||||||||||||
| use.ReplaceWithLclVar(comp, tempNum, &assign); | ||||||||||||||||||
|
|
||||||||||||||||||
| GenTree* newUseNode = use.Def(); | ||||||||||||||||||
| ContainCheckRange(oldUseNode->gtNext, newUseNode); | ||||||||||||||||||
|
|
||||||||||||||||||
| // We need to lower the LclVar and assignment since there may be certain | ||||||||||||||||||
| // types or scenarios, such as TYP_SIMD12, that need special handling | ||||||||||||||||||
|
|
||||||||||||||||||
| LowerNode(assign); | ||||||||||||||||||
|
Contributor
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. I do not think it is a correct approach, this function is used during different phases, for example, during long decomposition, so calling and lowering works node by node, so after we are done with See, for example, runtime/src/coreclr/jit/lower.cpp Line 504 in b443b8c
we call ReplaceWithLclVar and it creates these new nodes, but then we return node->gtNext that is the created store:runtime/src/coreclr/jit/lower.cpp Lines 785 to 791 in b443b8c
and it does their lowering.
Member
Author
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. The one used in long decomposition is the instance method exposed on
Member
Author
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.
We should already have lowered all the previous nodes, we aren't removing the "current" node, and we aren't inserting a node after the "current" node, so the "next" node is already correct. We simply need to ensure new nodes created and inserted before this node are also lowered. This is how the existing HWIntrinsic and SimdIntrinsics lowering has been handled and so the same technique is used here as well.
Contributor
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.
Agree
Don't understand,
Member
Author
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.
|
||||||||||||||||||
| LowerNode(newUseNode); | ||||||||||||||||||
|
|
||||||||||||||||||
| return newUseNode->AsLclVar(); | ||||||||||||||||||
| } | ||||||||||||||||||
| return oldUseNode->AsLclVar(); | ||||||||||||||||||
|
|
||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.