Skip to content

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

Merged
jakobbotsch merged 2 commits into
dotnet:mainfrom
SingleAccretion:Fix-LIR-Unused-Value
Jun 9, 2022
Merged

Set UnusedValue correctly for the operands of ARR_ADDR/BOX#70498
jakobbotsch merged 2 commits into
dotnet:mainfrom
SingleAccretion:Fix-LIR-Unused-Value

Conversation

@SingleAccretion
Copy link
Copy Markdown
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.

@ghost ghost added 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 labels Jun 9, 2022
@ghost
Copy link
Copy Markdown

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
Copy Markdown
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