Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

JIT: fix return type mismatch inline block for literal argument #16966

Merged
merged 1 commit into from
Mar 16, 2018

Conversation

AndyAyersMS
Copy link
Member

When we inline a method that returns one of its arguments, we need to make sure
to apply the callee's view of the argument type.

We fixed this for arguments that are caller locals in #11218. This change applies
similar logic to handle the case where the caller passes a literal constant.

Closes #16944.

When we inline a method that returns one of its arguments, we need to make sure
to apply the callee's view of the argument type.

We fixed this for arguments that are caller locals in dotnet#11218. This change applies
similar logic to handle the case where the caller passes a literal constant.

Closes #16944.
@AndyAyersMS
Copy link
Member Author

@briansull PTAL
cc @dotnet/jit-contrib

Don't expect any diffs from this -- will verify soon.

@AndyAyersMS
Copy link
Member Author

Arm failure seems to be a known issue (#16961).

I have verified this is no diff.

@briansull
Copy link

Should this fix go into 4.7.3?

@AndyAyersMS
Copy link
Member Author

I don't think it needs to be in 4.7.3.

@GrabYourPitchforks
Copy link
Member

I build coreclr locally off this PR and confirmed that it produces correct code gen for the ReadOnlySpan<byte> span = new byte[] { /* ... */ }; scenario.

@AndyAyersMS
Copy link
Member Author

@briansull you ok with this change?

Copy link

@CarolEidt CarolEidt left a comment

Choose a reason for hiding this comment

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

LGTM

@AndyAyersMS AndyAyersMS merged commit f6213ca into dotnet:master Mar 16, 2018
Copy link

@briansull briansull left a comment

Choose a reason for hiding this comment

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

Looks Good

mmitche added a commit that referenced this pull request Mar 16, 2018
AndyAyersMS added a commit to AndyAyersMS/coreclr that referenced this pull request Mar 19, 2018
With the advent of dotnet#16966 we may now see constant nonzero byrefs from
things like RVA statics. Tolerate these in `impCheckForNullPointer`.

Note previously we'd type these as ints/longs and so bail out of
`impCheckForNullPointer` after the first check.

Closes #17008.
AndyAyersMS added a commit that referenced this pull request Mar 20, 2018
With the advent of #16966 we may now see constant nonzero byrefs from
things like RVA statics. Tolerate these in `impCheckForNullPointer`.

Note previously we'd type these as ints/longs and so bail out of
`impCheckForNullPointer` after the first check.

Closes #17008.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JIT produces suboptimal code (unnecessary call) when using recent ReadOnlySpan compiler optimizations
4 participants