https://issues.dlang.org/show_bug.cgi?id=23746

--- Comment #3 from kinke <[email protected]> ---
Oh, I've just seen that `cast(int4) someFloat4` is a reinterpret cast with both
LDC and GDC, but not with DMD (=> conversion). So would need to uglify further
to please DMD, rendering vector masks with FP vectors next to useless.

That reinterpret-cast with LDC and GDC would be another difference from scalar
vs. vector. While bitwise ops for a scalar FP type don't really make much
sense, they are IMO key to making vector masks nice to work with in practice.

Oh and LDC is apparently the only compiler allowing the most trivial of
comparisons - identity comparisons (yielding a scalar bool). So the other
non-bitop use case for such vector masks, manually reducing to a scalar (e.g.,
`mask is 0`) currently only works with LDC, and needs a full array comparison
and boilerplate syntax with the other compilers (`mask.array == [0, 0, 0, 0]`).

--

Reply via email to