Repository navigation
Conversation
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-architecture code-generation and register-allocation effects need human review and runtime validation; no builds or tests were run here.
0 open findings
What changed in this PR
Addresses #135392 by preserving right-hand-side writes when the JIT morphs partial SIMD stores.
Changes:
- Keeps direct partial stores for expressions with persistent or ordering side effects.
- Retains
WithElementoptimization for side-effect-free expressions. - Adds numerics-field, SIMD-half, assignment, pure-expression, and volatile-read regressions.
| File | Description |
|---|---|
| src/tests/JIT/Regression_ro_2/Runtime_135392.cs | Adds partial-store regression coverage. |
| src/coreclr/jit/lclmorph.cpp | Prevents unsafe partial-store transformations. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
| if (varTypeIsSIMD(varDsc)) | ||
| { | ||
| // Preserve RHS side effects before reading the vector for a partial store. | ||
| if (isDef && ((indir->Data()->gtFlags & (GTF_PERSISTENT_SIDE_EFFECTS | GTF_ORDER_SIDEEFF)) != 0)) |
There was a problem hiding this comment.
Do we not need to consider GTF_EXCEPT? We notably now have GTF_OBS_EFFECT which is GTF_SIDE_EFFECT | GTF_ORDER_SIDEEFF (which is therefore GTF_PERSISTENT_SIDE_EFFECTS | GTF_EXCEPT | GTF_ORDER_SIDEEFF)
There was a problem hiding this comment.
Yeah, let's use GTF_OBS_EFFECT here then
For
v.X = Helper(ref v), morphing could read the full vector before the RHS, then overwrite the callee’s writes to other fields.WithElementfor side-effect-free RHS expressions.v.X = Helper(ref v)on aVector4local loses the callee's write tov.Y#135392