Skip to content

Conversation

@tannergooding
Copy link
Member

@tannergooding tannergooding commented Sep 19, 2022

This ensures that VN recognizes commutative HWIntrinsics as commutative. It not being set is likely why #75818 had no diffs.

Notably there are some intrinsics which are "maybe commutative". These either require special handling (due to taking more than 2 operands) or require checking that one of the inputs is constant and within the bounds of a particular optimization. Such intrinsics aren't being handled as part of this change.

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 19, 2022
@ghost ghost assigned tannergooding Sep 19, 2022
@ghost
Copy link

ghost commented Sep 19, 2022

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

Issue Details

This ensures that VN recognizes commutative HWIntrinsics as commutative. It not being set is likely why #75818 had no diffs.

Author: tannergooding
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@tannergooding
Copy link
Member Author

It found a couple of small diffs due to new CSEs, but only in tests.

Linux Arm64:

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 490656816 (overridden on cmd)
Total bytes of diff: 490656792 (overridden on cmd)
Total bytes of delta: -24 (-0.00 % of base)
    diff is an improvement.
    relative diff is an improvement.

Windows x64:

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 322064734 (overridden on cmd)
Total bytes of diff: 322064717 (overridden on cmd)
Total bytes of delta: -17 (-0.00 % of base)
    diff is an improvement.
    relative diff is an improvement.

User code may see more improvements.

@tannergooding
Copy link
Member Author

CC. @dotnet/jit-contrib. A small/minor change.

@tannergooding tannergooding merged commit a9c08d4 into dotnet:main Sep 20, 2022
tannergooding added a commit to tannergooding/runtime that referenced this pull request Oct 6, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 21, 2022
@tannergooding tannergooding deleted the hwi-commutative branch November 11, 2022 15:09
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.

3 participants