Skip to content

Implement vpblendvb optimization in the JIT#69509

Merged
dakersnar merged 9 commits intodotnet:mainfrom
dakersnar:fix-67039
May 25, 2022
Merged

Implement vpblendvb optimization in the JIT#69509
dakersnar merged 9 commits intodotnet:mainfrom
dakersnar:fix-67039

Conversation

@dakersnar
Copy link
Contributor

Fixes #67039

This optimizes calls to ConditonalSelect that use a "per-element mask" intrinsic as the condition vector. Thank you @tannergooding for collaborating with me on this one. Reviewers, please double check that the new HW_Flag_ReturnsPerElementMask was correctly added to all relevant intrinsics (in src/coreclr/jit/hwintrinsiclistxarch.h). Style nitpicks also appreciated.

@ghost
Copy link

ghost commented May 18, 2022

Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #67039

This optimizes calls to ConditonalSelect that use a "per-element mask" intrinsic as the condition vector. Thank you @tannergooding for collaborating with me on this one. Reviewers, please double check that the new HW_Flag_ReturnsPerElementMask was correctly added to all relevant intrinsics (in src/coreclr/jit/hwintrinsiclistxarch.h). Style nitpicks also appreciated.

Author: dakersnar
Assignees: -
Labels:

area-System.Runtime.Intrinsics

Milestone: -

@dakersnar dakersnar changed the title Implement vpblendvb optimization Implement vpblendvb optimization in the JIT May 18, 2022
@tannergooding
Copy link
Member

Changes look correct to me. Left a note where a couple of intrinsics are missing the flag and where we could improve the opportunistic check.

@tannergooding
Copy link
Member

This needs an additional review from someone on @dotnet/jit-contrib

@dakersnar
Copy link
Contributor Author

@dotnet/jit-contrib would love to get this in before the preview5 snap if anyone is available for a review.

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

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

I didn't carefully check the instruction table changes, but everything else looks ok.

@dakersnar dakersnar merged commit 10d8a36 into dotnet:main May 25, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jun 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vector.ConditionalSelect and Vector128.ConditionalSelect don't emit vpblendvb on x64

4 participants