-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Let GenTreeCopyOrReload handle scenarios when FEATURE_MULTIREG_RET is disabled #82451
Conversation
@dotnet/jit-contrib @tannergooding |
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.
LGTM as I understand the feature and associated code
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.
LGTM as well with a small comment correction.
src/coreclr/jit/gentree.h
Outdated
@@ -8039,17 +8039,14 @@ struct GenTreePutArgSplit : public GenTreePutArgStk | |||
// Represents GT_COPY or GT_RELOAD node | |||
// | |||
// As it turns out, these are only needed on targets that happen to have multi-reg returns. |
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.
// As it turns out, these are only needed on targets that happen to have multi-reg returns. | |
// Needed to support multi-reg ops. |
src/coreclr/jit/gentree.h
Outdated
@@ -8039,17 +8039,14 @@ struct GenTreePutArgSplit : public GenTreePutArgStk | |||
// Represents GT_COPY or GT_RELOAD node | |||
// | |||
// As it turns out, these are only needed on targets that happen to have multi-reg returns. | |||
// However, they are actually needed on any target that has any multi-reg ops. It is just | |||
// coincidence that those are the same (and there isn't a FEATURE_MULTIREG_OPS). | |||
// However, they are actually needed on any target that has any multi-reg ops. |
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.
// However, they are actually needed on any target that has any multi-reg ops. |
Otherwise the comments contradict themselves:
... are only needed on targets that happen to have multi-reg returns ...
... are actually needed on any target that has any multi-reg ops ...
/azp run runtime-coreclr superpmi-diffs |
/azp run runtime-coreclr superpmi-replay |
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
Azure Pipelines successfully started running 1 pipeline(s). |
Currently Windows ABI doesn't allow to split the result and return it in multiple registers. However, in #66551, we exposed an API that will let us return the result in multiple registers. The ABI doesn't allow us to do, but since
DivRem
added in #66551 is an intrinsic, we should continue to let the instruction return the result in multiple registers. Thanks @tannergooding for helping me understand this concept.GenTreeCopyOrReload
had special code to handle scenario whenFEATURE_MULTIREG_RET
was allowed (on unix x64/arm64 and windows arm64) but this was breaking withDivRem
support. The fix is to haveGenTreeCopyOrReload
also handle scenarios whenFEATURE_MULTIREG_RET
is disabled.Fixes: #82397