Skip to content

Clear IconHandle when we fold compares - #95383

Merged
MichalStrehovsky merged 2 commits into
dotnet:mainfrom
MichalStrehovsky:fix95367
Nov 29, 2023
Merged

Clear IconHandle when we fold compares#95383
MichalStrehovsky merged 2 commits into
dotnet:mainfrom
MichalStrehovsky:fix95367

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

Fixes#95367.

Relevant part of the JitDump:

Using `if true` assertions from pred BB02
Assertions in: #01
fgMorphTree BB04, STMT00021 (before)
[000070] DA--------- * STORE_LCL_VAR ubyte V10 tmp9
[000057] ----------- \--* CAST int <- ubyte <- int
[000006] ----------- \--* EQ int
[000004] ----------- +--* LCL_VAR ref V02 tmp1 (last use)
[000055] H---------- \--* CNS_INT(h) ref 'Frozen EmptyPartition`1<Int32> object'
Assertion prop for index #01 in BB04:
[000006] ----------- * EQ int
GenTreeNode creates assertion:
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #02
fgMorphTree BB04, STMT00021 (after)
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
[000055] H----+----- \--* CNS_INT(h) int

The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the CNS_INT is no longer a handle at that point because we just bashed it to a constant 1, but JitInterface gets a question about it that crashes with the same exception as reported in the issue number this is fixing.

Cc @dotnet/ilc-contrib

@dotnet/jit-contrib PTAL

Fixesdotnet#95367.
Relevant part of the JitDump:
```
Using `if true` assertions from pred BB02
Assertions in: #1
fgMorphTree BB04, STMT00021 (before)
[000070] DA--------- * STORE_LCL_VAR ubyte V10 tmp9
[000057] ----------- \--* CAST int <- ubyte <- int
[000006] ----------- \--* EQ int
[000004] ----------- +--* LCL_VAR ref V02 tmp1 (last use)
[000055] H---------- \--* CNS_INT(h) ref 'Frozen EmptyPartition`1<Int32> object'
Assertion prop for index #1 in BB04:
[000006] ----------- * EQ int
GenTreeNode creates assertion:
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #2
fgMorphTree BB04, STMT00021 (after)
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
[000055] H----+----- \--* CNS_INT(h) int
```
The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the `CNS_INT` is no longer a handle at that point because we just bashed it to a constant 1.
@MichalStrehovskyMichalStrehovsky added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 29, 2023
@ghost

Copy link
Copy Markdown

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

Issue Details

Fixes #95367.

Relevant part of the JitDump:

Using `if true` assertions from pred BB02
Assertions in: #01
fgMorphTree BB04, STMT00021 (before)
[000070] DA--------- * STORE_LCL_VAR ubyte V10 tmp9
[000057] ----------- \--* CAST int <- ubyte <- int
[000006] ----------- \--* EQ int
[000004] ----------- +--* LCL_VAR ref V02 tmp1 (last use)
[000055] H---------- \--* CNS_INT(h) ref 'Frozen EmptyPartition`1<Int32> object'
Assertion prop for index #01 in BB04:
[000006] ----------- * EQ int
GenTreeNode creates assertion:
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #02
fgMorphTree BB04, STMT00021 (after)
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
[000055] H----+----- \--* CNS_INT(h) int

The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the CNS_INT is no longer a handle at that point because we just bashed it to a constant 1, but JitInterface gets a question about it that crashes with the same exception as reported in the issue number this is fixing.

Cc @dotnet/ilc-contrib

@dotnet/jit-contrib PTAL

Author:MichalStrehovsky
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@MichalStrehovsky

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-nativeaot-outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment threadsrc/coreclr/jit/assertionprop.cpp Outdated

@EgorBoEgorBo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@MichalStrehovsky
MichalStrehovsky merged commit b95bccb into dotnet:mainNov 29, 2023
@MichalStrehovsky
MichalStrehovsky deleted the fix95367 branch November 29, 2023 14:51
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Dec 30, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclrCLR 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.

[outerloop] [NativeAOT] Code generation failed for method System.Linq.Tests.EmptyPartitionTests.SingleInstance()

2 participants

@MichalStrehovsky@EgorBo