Skip to content

Conversation

@jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Feb 6, 2022

This ensures we normalize returned indirs of locals, even when we fold
it into an access of a promoted local's field. This may change a signed
indir into access of an unsigned field, which may need a sign-extending
cast to be inserted.

It is not ideal that fgMorphRetInd can 'lose' this information, but
given that it is a specialized optimization it seems the simplest
solution is to just rely on the follow-up normalization.

Fix #61359

Only diffs in the miscompiled method.

This ensures we normalize returned indirs of locals, even when we fold
it into an access of a promoted local's field. This may change a signed
indir into access of an unsigned field, which may need a sign-extending
cast to be inserted.

It is not ideal that fgMorphRetInd can 'lose' this information, but
given that it is a specialized optimization it seems the simplest
solution is to just rely on the follow-up normalization.

Fix dotnet#61359
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 6, 2022
@ghost ghost assigned jakobbotsch Feb 6, 2022
@ghost
Copy link

ghost commented Feb 6, 2022

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

Issue Details

This ensures we normalize returned indirs of locals, even when we fold
it into an access of a promoted local's field. This may change a signed
indir into access of an unsigned field, which may need a sign-extending
cast to be inserted.

It is not ideal that fgMorphRetInd can 'lose' this information, but
given that it is a specialized optimization it seems the simplest
solution is to just rely on the follow-up normalization.

Fix #61359

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib

@jakobbotsch
Copy link
Member Author

The MacOS timeouts are known from other PRs.

@jakobbotsch jakobbotsch merged commit af1c2db into dotnet:main Feb 7, 2022
@jakobbotsch jakobbotsch deleted the fix-61359 branch February 7, 2022 12:04
@ghost ghost locked as resolved and limited conversation to collaborators Mar 9, 2022
@jakobbotsch
Copy link
Member Author

/backport to release/6.0

@github-actions github-actions bot unlocked this conversation Mar 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2023

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/4306469666

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 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.

System.Runtime.Extensions.Tests: Assertion failed

2 participants