Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Sep 10, 2021

Backport of #58589 to release/6.0

/cc @jakobbotsch

Customer Impact

Returning a pointer indirection reinterpreting a small struct as a small primitive type does not correctly zero/sign extend the result. We have one such case in our own libraries.

Testing

There are two test cases included.

Risk

Low, this is a targeted fix that inserts the necessary zero/sign-extensions when necessary.

We may need to sign/zero-extend when we do this replacement very late.
Normally this cast would be inserted in morph.

Fix #58373
Retyping it to the type of the ret node is not right when reinterpreting
small structs as a type that needs to be normalized.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 10, 2021
@ghost
Copy link

ghost commented Sep 10, 2021

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

Issue Details

Backport of #58589 to release/6.0

/cc @jakobbotsch

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Please get a code review and once we have a green ci we can merge.

@JulieLeeMSFT
Copy link
Member

CC @AndyAyersMS PTAL.

@jeffschwMSFT jeffschwMSFT merged commit 9f2e4ac into release/6.0 Sep 10, 2021
@jkotas jkotas deleted the backport/pr-58589-to-release/6.0 branch September 18, 2021 04:09
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
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.

5 participants