Skip to content

Change bitselect's condition mask to always be integral #5962

Open
@alexcrichton

Description

@alexcrichton

This came up during #5918 and the removal of the old vselect instruction. Currently the bitselect instruction uses the same type for all of its inputs and its output, but that means that for a floating-point selection the condition mask is also a floating-point value which is typically not the case. For example an icmp would produce an integer vector which could be used to bitselect the results of the comparisons.

Using an integral mask would make the NaN-canonicalization for vectors slightly simpler and additionally make it easier to re-add the optimizations removed in #5918 where bitselect-of-fcmp for float vectors could be optimized into f{min,max} where possible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions