Skip to content

Conversation

@tannergooding
Copy link
Member

@tannergooding tannergooding commented Feb 15, 2023

This adds support for other primitive unary and binary operations but does not cover relational operators yet.

Tests still need to be added as well.

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

ghost commented Feb 15, 2023

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

Issue Details

This adds support for other primtive unary and binary operations but does not cover relational operators yet.

Author: tannergooding
Assignees: tannergooding
Labels:

area-CodeGen-coreclr

Milestone: -

@tannergooding
Copy link
Member Author

spmi-replay failures are #82397

@tannergooding
Copy link
Member Author

/azp run runtime-coreclr jitstress-isas-x86, runtime-coreclr jitstress-isas-arm, runtime-coreclr outerloop, runtime-coreclr jitstress, runtime-coreclr libraries-jitstress, Fuzzlyn

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@tannergooding tannergooding marked this pull request as ready for review February 20, 2023 16:44
@tannergooding
Copy link
Member Author

CC. @dotnet/jit-contrib

More SIMD constant folding support, covering the other basic binary operators (but not comparisons). All of these have equivalent scalar handling.

Comment on lines 400 to 401
uint32_t arg0Bits = *reinterpret_cast<uint32_t*>(&arg0);
uint32_t arg1Bits = *reinterpret_cast<uint32_t*>(&arg1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically UB -- can we use memcpy to be safe?

Copy link
Member Author

@tannergooding tannergooding Feb 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update the new occurrences in this PR.

Notably we're doing this in many places throughout the JIT, so its a more general thing that should be fixed (separately, if it's a concern).

Copy link
Member

@jakobbotsch jakobbotsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tannergooding tannergooding merged commit 7219954 into dotnet:main Feb 23, 2023
@tannergooding tannergooding deleted the cns_vec-fold branch February 23, 2023 16:47
@ghost ghost locked as resolved and limited conversation to collaborators Mar 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants