Skip to content
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

JIT: Handle mistyped commas in morph in pre-order too #91587

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

jakobbotsch
Copy link
Member

Morph has post-order logic to compensate for mistyped commas produced by impStoreStruct. However, block morphing can optimize unused stores into INDs; this interacts with the mistyped commas to produce illegal IR shapes (e.g. COMMA<simd12>(..., IND<ubyte>(...))).

The ideal solution is to fix impStoreStruct (#91586 tracks this), but this change has a more surgical fix that can be backported to .NET 8. It duplicates the compensation logic to run in pre-order too.

Fix #91443

Morph has post-order logic to compensate for mistyped commas produced by
impStoreStruct. However, block morphing can optimize unused stores into
INDs; this interacts with the mistyped commas to produce illegal IR
shapes (e.g. `COMMA<simd12>(..., IND<ubyte>(...))`).

The ideal solution is to fix impStoreStruct (dotnet#91586 tracks this), but
this change has a more surgical fix for the problem that can be
backported to .NET 8.

Fix dotnet#91443
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 5, 2023
@ghost ghost assigned jakobbotsch Sep 5, 2023
@ghost
Copy link

ghost commented Sep 5, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

Morph has post-order logic to compensate for mistyped commas produced by impStoreStruct. However, block morphing can optimize unused stores into INDs; this interacts with the mistyped commas to produce illegal IR shapes (e.g. COMMA<simd12>(..., IND<ubyte>(...))).

The ideal solution is to fix impStoreStruct (#91586 tracks this), but this change has a more surgical fix that can be backported to .NET 8. It duplicates the compensation logic to run in pre-order too.

Fix #91443

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch jakobbotsch added this to the 8.0.0 milestone Sep 5, 2023
@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr superpmi-diffs

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @EgorBo

No diffs

@jakobbotsch jakobbotsch requested a review from EgorBo September 6, 2023 12:20
@jakobbotsch jakobbotsch merged commit 75c1760 into dotnet:main Sep 7, 2023
@jakobbotsch
Copy link
Member Author

/backport to release/8.0

@jakobbotsch jakobbotsch deleted the fix-91443 branch September 7, 2023 09:10
@jakobbotsch jakobbotsch restored the fix-91443 branch September 7, 2023 09:10
@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6107757600

@jakobbotsch jakobbotsch deleted the fix-91443 branch September 7, 2023 09:14
@ghost ghost locked as resolved and limited conversation to collaborators Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assertion failed 'store->TypeGet() == src->TypeGet()' during 'Optimize Valnum CSEs'
2 participants