Open
Description
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.