Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed 'varTypeIsStruct(TypeGet())' during 'Optimize Valnum CSEs' #85037

Closed
EgorBo opened this issue Apr 19, 2023 · 3 comments · Fixed by #85320
Closed

Assertion failed 'varTypeIsStruct(TypeGet())' during 'Optimize Valnum CSEs' #85037

EgorBo opened this issue Apr 19, 2023 · 3 comments · Fixed by #85320
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs
Milestone

Comments

@EgorBo
Copy link
Member

EgorBo commented Apr 19, 2023

Failing in runtime-coreclr jitstress-isas-x86
e.g.

https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-84946-merge-ee46ebab9be144078a/Regression_2/1/console.bd4bc3aa.log?helixlogtype=result

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 19, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Apr 19, 2023
@ghost
Copy link

ghost commented Apr 19, 2023

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

Issue Details

Failing in runtime-coreclr jitstress-isas-x86
e.g.

https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-84946-merge-ee46ebab9be144078a/Regression_2/1/console.bd4bc3aa.log?helixlogtype=result

Author: EgorBo
Assignees: -
Labels:

area-CodeGen-coreclr, untriaged

Milestone: -

@JulieLeeMSFT
Copy link
Member

@jakobbotsch Please take a look. It happens in Antigen and other tests as well.

@jakobbotsch
Copy link
Member

This test sets JitOptRepeat=*. It ends up with the IR shape

N008 (  5,  6) CSE #03 (def)[000395] -----------                           COMMA     struct $3c3
N006 (  5,  6) CSE #02 (use)[000394] -----------                         ├──▌  COMMA     int    $180
N004 (  1,  1)              [000393] -----------                           ├──▌  LCL_VAR   int    V57 tmp45        u:1 (last use) $180
N005 (  3,  4)              [000392] -------N---                           └──▌  LCL_FLD   int    V01 loc0         u:1[+8] (last use) $180
N007 (  0,  0)              [000234] -----------                         └──▌  NOP       void   $3c3

after liveness where CSE gets confused about the mismatched types.

jakobbotsch added a commit to jakobbotsch/runtime that referenced this issue Apr 25, 2023
This code could create IR shapes like

COMMA struct
  ...
  ASG struct
    dst
    src

After liveness that would sometimes result in

COMMA struct
  ...
  NOP void

which could confuse optimization phases when JitOptRepeat was enabled.

The more canonical shape for these side-effecting GT_COMMA nodes has
them TYP_VOID typed as shown by gtExtractSideEffList, so do the same in
block morph.

Fix dotnet#85037
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Apr 25, 2023
jakobbotsch added a commit that referenced this issue Apr 25, 2023
This code could create IR shapes like

COMMA struct
  ...
  ASG struct
    dst
    src

After liveness that would sometimes result in

COMMA struct
  ...
  NOP void

which could confuse optimization phases when JitOptRepeat was enabled.

The more canonical shape for these side-effecting GT_COMMA nodes has
them TYP_VOID typed as shown by gtExtractSideEffList, so do the same in
block morph.

Fix #85037
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Apr 25, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 25, 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 blocking-clean-ci-optional Blocking optional rolling runs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants