Skip to content

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Nov 10, 2023

  • Validate types used in IR nodes.
  • Remove varTypeIsSmallInt because it's the same as varTypeIsSmall.
  • Remove varTypeGCtype because it's the same as varTypeGC
  • Fix small-typed nodes produced by optOptimizeBools (e.g. ubyte GT_OR(op1, op2) ...)
  • Fix small-typed nodes used by GT_HWINTRINSIC, e.g. all comparisons and ToScalar

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 10, 2023
@ghost ghost assigned EgorBo Nov 10, 2023
@ghost
Copy link

ghost commented Nov 10, 2023

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

Issue Details

Validate types used in IR nodes.

Also, remove varTypeIsSmallInt because it's the same as varTypeIsSmall.

PS: plan to remove the GT_HWINTRINSIC quirk as part of this PR.

Author: EgorBo
Assignees: EgorBo
Labels:

area-CodeGen-coreclr

Milestone: -

@EgorBo
Copy link
Member Author

EgorBo commented Nov 11, 2023

/azp list

This comment was marked as resolved.

@EgorBo
Copy link
Member Author

EgorBo commented Nov 11, 2023

/azp run runtime-coreclr outerloop, runtime-coreclr jitstress, runtime-coreclr pgo

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@EgorBo
Copy link
Member Author

EgorBo commented Nov 13, 2023

the latest diffs are better https://dev.azure.com/dnceng-public/public/_build/results?buildId=467438&view=ms.vss-build-web.run-extensions-tab but there are still regressions because of GT_HWINTRINSIC (mainly around op_Equality)

@EgorBo
Copy link
Member Author

EgorBo commented Nov 24, 2023

@jakobbotsch @dotnet/jit-contrib PTAL

Small diffs are caused by the GT_HWINTRINSIC changes (there were qute a few trees with small types as IR types)

Size regressions on arm64 seem to be perf improvements - optOptimizeBool kicks in where previously it didn't, e.g.:

image
(less branches, but larger size), in IR it's:

Main:


***** BB02
N006 ( 11, 10) [000025] -----------                         *  JTRUE     void   $VN.Void
N005 (  9,  8) [000024] J------N---                         \--*  NE        int    $181
N003 (  7,  5) [000176] -----------                            +--*  HWINTRINSIC ubyte  int op_Equality $141
N001 (  3,  2) [000283] -----------                            |  +--*  CNS_VEC   simd16<0x00000005, 0x00000005, 0x00000005, 0x00000005> $101
N002 (  3,  2) [000282] -----------                            |  \--*  CNS_VEC   simd16<0x00000003, 0x00000003, 0x00000003, 0x00000003> $100
N004 (  1,  2) [000023] -----------                            \--*  CNS_INT   int    0 $40

***** BB03
N006 (  9, 10) [000032] -----------                         *  JTRUE     void   $VN.Void
N005 (  7,  8) [000031] J------N---                         \--*  NE        int    $182
N003 (  5,  5) [000207] -----------                            +--*  HWINTRINSIC ubyte  int op_Equality $142
N001 (  1,  2) [000206] -----------                            |  +--*  CNS_VEC   simd16<0x00000000, 0x00000000, 0x00000000, 0x00000000> $102
N002 (  3,  2) [000284] -----------                            |  \--*  CNS_VEC   simd16<0x00000003, 0x00000003, 0x00000003, 0x00000003> $100
N004 (  1,  2) [000030] -----------                            \--*  CNS_INT   int    0 $40

PR:



N010 ( 17, 16) [000025] -----------                         *  JTRUE     void   $VN.Void
N009 ( 15, 14) [000024] J------N---                         \--*  NE        int   
N007 ( 13, 11) [000295] -----------                            +--*  OR        int   
N003 (  7,  5) [000177] -----------                            |  +--*  HWINTRINSIC int    int op_Equality $142
N001 (  3,  2) [000288] -----------                            |  |  +--*  CNS_VEC   simd16<0x00000005, 0x00000005, 0x00000005, 0x00000005> $101
N002 (  3,  2) [000287] -----------                            |  |  \--*  CNS_VEC   simd16<0x00000003, 0x00000003, 0x00000003, 0x00000003> $100
N006 (  5,  5) [000209] -----------                            |  \--*  HWINTRINSIC int    int op_Equality $144

@EgorBo EgorBo requested a review from jakobbotsch November 24, 2023 12:38
@EgorBo EgorBo merged commit f6bd16d into dotnet:main Nov 25, 2023
@EgorBo EgorBo deleted the diag-node-types branch November 25, 2023 14:30
@BruceForstall
Copy link
Contributor

Thanks for doing this! I'm looking forward to all the follow-up work on the TODOs :-)

@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants