Skip to content

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

Closed

Description

@gfoidl

Vector.ConditionalSelect emits on x64 with AVX2 supported a series of

vpand
vpandn
vpor

instead of emitting

vpblendvb

only.

The same is for Vector128.ConditionalSelect.

Is this by design or a missed oppurtunity to use available instructions?

See also sharplab and I see the same on .NET 7 Preview 2.

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Mar 23, 2022
  2. tannergooding commented on Mar 23, 2022

    @tannergooding
    Member

    ConditionalSelect is "bitwise" and so optimizing it to be blend requires an additional JIT optimization that's not been implemented yet (it has to know the mask comes from something like a Compare).

    That optimization is planned, its just not been done yet.

  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Mar 23, 2022
  4. added this to the 7.0.0 milestone on Mar 23, 2022
  5. self-assigned this
    on May 9, 2022
  6. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on May 18, 2022
  7. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on May 25, 2022
  8. ghost locked as resolved and limited conversation to collaborators on Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions