Open calebzulawski opened 4 years ago
On one hand, logically there isn't any reason it should yield the same results, as integers are simpler types. On the other hand, https://github.com/rust-lang/stdsimd/issues/97 still gives me the heebie-jeebies about adding simd_abs
as an intrinsic.
What would simd_lt_packed
be equivalent to?
I think I previously decided (but never updated this issue) that we don't need an intrinsics for operating on packed bit masks. I think we only need two intrinsics, one for sign extending a packed bit mask to a full width mask, and one for truncating a full width mask to a bit mask.
Actually, looking at the rustc codegen, I think simd_bitmask
might be the truncation I'm talking about.
I think it would be helpful to collect a list of all compiler intrinsics (the
extern "platform-intrinsics"
ones) that need to be added.simd_neg
simd_overflowing_add
etcsimd_trunc
simd_round
simd_lt_packed
etc (all other packed intrinsics can be emulated with this one to start)~simd_sat_shl
<-- only supported in recent LLVMsimd_abs
simd_sext
(or some kind ofsimd_cast
for integer -> mask)simd_bitmask
/simd_select_bitmask
(these already exist, but they should be modified to accept arrays ofu8
simd_bswap