-
Notifications
You must be signed in to change notification settings - Fork 91
Closed
Description
What should the semantics of the simd_select_bitmask
intrinsic be when the bitmask has "out-of-bounds" bit set? This can happen when the vector length is less than 8, and the bitmask is stored as a u8
.
- This could be just declared UB, so codegen does not have to worry about this case. That's what implement simd bitmask intrinsics miri#2029 implements for Miri. However, then this is unsound, as a user can pass an arbitrary
u8
to that function. So, we'd have to mask out the extra bits before passing them tosimd_select_bitmask
. - Or we could just say that these extra bits are ignored, and then codegen backends will have to make sure they handle that case properly.
The portable-simd test suite currently does not hit this case at all.
Metadata
Metadata
Assignees
Labels
No labels