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

Set UnusedValue correctly for the operands of ARR_ADDR/BOX #70498

Merged
merged 2 commits into from
Jun 9, 2022

Conversation

SingleAccretion
Copy link
Contributor

@SingleAccretion SingleAccretion commented Jun 9, 2022

#70398 exposed a previously unseen case of a top-level ARR_ADDR node:

***** BB05
STMT00032 ( ??? ... 0x0E9 )
N010 ( 10,  9) [001316] -A---------                         *  ARR_ADDR  byref ubyte[] $301
N009 ( 10,  9) [001317] -A-----N---                         \--*  ADD       byref  $2ca
N007 ( 10,  9) [002064] -A---------                            +--*  COMMA     byref  $2c0
N005 (  7,  7) [002062] -A------R--                            |  +--*  ASG       byref  $VN.Void
N004 (  3,  2) [002061] D------N---                            |  |  +--*  LCL_VAR   byref  V70 cse3         d:1 $2c0
N003 (  3,  4) [001318] -----------                            |  |  \--*  ADD       byref  $2c0
N001 (  1,  1) [001319] -----------                            |  |     +--*  LCL_VAR   ref    V03 loc3         u:2 $241
N002 (  1,  2) [001320] -----------                            |  |     \--*  CNS_INT   long   16 $1c1
N006 (  3,  2) [002063] -----------                            |  \--*  LCL_VAR   byref  V70 cse3         u:1 $2c0
N008 (  1,  2) [002085] -----------                            \--*  CNS_INT   long   1 $1c4

When we rationalize these nodes, we replace them with their operands. That handling was not quite complete, resulting in some missed UnusedValue flags.

Fixes #70466.

No diffs as expected.

@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 Jun 9, 2022
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Jun 9, 2022
@ghost
Copy link

ghost commented Jun 9, 2022

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

Issue Details

#70398 exposed a previously unseen case of top-level ARR_ADDR nodes:

***** BB05
STMT00032 ( ??? ... 0x0E9 )
N010 ( 10,  9) [001316] -A---------                         *  ARR_ADDR  byref ubyte[] $301
N009 ( 10,  9) [001317] -A-----N---                         \--*  ADD       byref  $2ca
N007 ( 10,  9) [002064] -A---------                            +--*  COMMA     byref  $2c0
N005 (  7,  7) [002062] -A------R--                            |  +--*  ASG       byref  $VN.Void
N004 (  3,  2) [002061] D------N---                            |  |  +--*  LCL_VAR   byref  V70 cse3         d:1 $2c0
N003 (  3,  4) [001318] -----------                            |  |  \--*  ADD       byref  $2c0
N001 (  1,  1) [001319] -----------                            |  |     +--*  LCL_VAR   ref    V03 loc3         u:2 $241
N002 (  1,  2) [001320] -----------                            |  |     \--*  CNS_INT   long   16 $1c1
N006 (  3,  2) [002063] -----------                            |  \--*  LCL_VAR   byref  V70 cse3         u:1 $2c0
N008 (  1,  2) [002085] -----------                            \--*  CNS_INT   long   1 $1c4

When we rationalize these nodes, we replace them with their operands. That handling was not quite complete, resulting in some missed UnusedValue flags.

Fixes #70466.

Author: SingleAccretion
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@SingleAccretion SingleAccretion changed the title Set UnusedValue when replacing dummy defs Set UnusedValue correctly for ARR_ADDR/BOX operands Jun 9, 2022
@SingleAccretion SingleAccretion changed the title Set UnusedValue correctly for ARR_ADDR/BOX operands Set UnusedValue correctly for the operands of ARR_ADDR/BOX Jun 9, 2022
@SingleAccretion SingleAccretion marked this pull request as ready for review June 9, 2022 20:30
@SingleAccretion
Copy link
Contributor Author

@dotnet/jit-contrib

Fixing stress.

@jakobbotsch jakobbotsch merged commit 1bebb14 into dotnet:main Jun 9, 2022
@SingleAccretion SingleAccretion deleted the Fix-LIR-Unused-Value branch June 9, 2022 21:29
@ghost ghost locked as resolved and limited conversation to collaborators Jul 10, 2022
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 community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure JIT/Directed/cmov/Float_Or_Op_cs_do/Float_Or_Op_cs_do.sh
2 participants