Skip to content

Conversation

@sandreenko
Copy link
Contributor

@erozenfeld noticed that changes from #39824 could work wrong on arm32 because we could create a NullCheck node after Lower phase. If it reaches codegen it will fail there. I don't have a repro test, this path is probably unreachable for arm32 currently, but it is better to use a newly added function from #40226 to handle it.

Also, use TYP_INT for the new NULLCHECK nodes, before in some places we were using TYP_BYTE. The actual type doesn't matter, codegen ignores it.

No libs diffs.

@sandreenko sandreenko added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 4, 2020
@sandreenko
Copy link
Contributor Author

PTAL @erozenfeld @CarolEidt @dotnet/jit-contrib

Copy link
Member

@erozenfeld erozenfeld left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@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, though I believe that historically GT_NULLCHECKs have always been TYP_BYTE (not sure why, since codegen ignores it) so I'm just curious why you changed it.

@sandreenko
Copy link
Contributor Author

LGTM, though I believe that historically GT_NULLCHECKs have always been TYP_BYTE (not sure why, since codegen ignores it) so I'm just curious why you changed it.

We are changing it to TYP_INT in TransformUnusedIndirection (and before that we were changing it to TYP_INT in LowerIndir, https://github.com/dotnet/runtime/pull/40226/files). So it was a little confusing that we were changing it once to TYP_INT, then calling gtChangeOperToNullCheck and changing it to TYP_BYTE.

I could make a change in TransformUnusedIndirection and use TYP_BYTE there instead.

@CarolEidt
Copy link
Contributor

I could make a change in TransformUnusedIndirection and use TYP_BYTE there instead.

No need; I was just curious about the reasoning. Thanks

@sandreenko sandreenko merged commit 02db286 into dotnet:master Aug 5, 2020
@sandreenko sandreenko deleted the fixPotentialNullCheckCreationAfterLIRForArm32 branch August 5, 2020 04:17
Jacksondr5 pushed a commit to Jacksondr5/runtime that referenced this pull request Aug 10, 2020
* Use `TransformUnusedIndirection` in LIR liveness.

* Use `TYP_INT` as `TransformUnusedIndirection` does.

* fix grammar.
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
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.

4 participants