-
Notifications
You must be signed in to change notification settings - Fork 5.4k
JIT: avoid store forward stall for struct params in GS frames #127487
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -1495,7 +1495,15 @@ int LinearScan::BuildBlockStore(GenTreeBlk* blkNode) | |
| unsigned regSize = m_compiler->roundDownSIMDSize(size); | ||
| unsigned remainder = size; | ||
|
|
||
| if ((size >= regSize) && (regSize > 0)) | ||
| bool srcIsRegArg = false; | ||
|
|
||
| if (src->OperIs(GT_LCL_VAR)) | ||
| { | ||
| unsigned srcLclNum = src->AsLclVar()->GetLclNum(); | ||
| srcIsRegArg = m_compiler->lvaGetDesc(srcLclNum)->lvIsMultiRegArg; | ||
| } | ||
|
Comment on lines
+1498
to
+1504
|
||
|
|
||
| if ((size >= regSize) && (regSize > 0) && !srcIsRegArg) | ||
| { | ||
| // We need a float temporary if we're doing SIMD operations | ||
|
|
||
|
|
@@ -1505,7 +1513,8 @@ int LinearScan::BuildBlockStore(GenTreeBlk* blkNode) | |
| remainder %= regSize; | ||
| } | ||
|
|
||
| if ((remainder > 0) && ((regSize == 0) || (isPow2(remainder) && (remainder <= REGSIZE_BYTES)))) | ||
| if (srcIsRegArg || | ||
| ((remainder > 0) && ((regSize == 0) || (isPow2(remainder) && (remainder <= REGSIZE_BYTES))))) | ||
| { | ||
| // We need an int temporary if we're not doing SIMD operations | ||
| // or if are but the remainder is a power of 2 and less than the | ||
|
|
||
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.
The new boolean
srcIsRegArgis derived fromlvIsMultiRegArg(multi-register struct arg), not fromlvIsRegArg/a generic register-argument property. Renaming it to something likesrcIsMultiRegArgwould make the intent clearer and avoid confusion with the existinglvIsRegArgflag on locals.