There are some occasions where it is useful to perform bitwise AND/OR
on floating point numbers (e.g. when working with extended precision).
An easy way to do this is to bitcast to an unsigned integer, do your
operation, then bitcast back to a float, which will generate IR along
the lines of:
%1 = bitcast double %0 to i64
%2 = and i64 %1, -4294967296
%3 = bitcast i64 %2 to double
ret double %3
Is LLVM able translate this to use the relevant floating point
instructions when available (i.e. ANDPD/VANDPD on x86)?
(this originally came up on julia-dev: