[PATCH] Add getSwappedBytes implementations for float / double
Matthew.Arsenault at amd.com
Mon Jan 12 09:54:34 PST 2015
On 01/12/2015 09:52 AM, Mehdi AMINI wrote:
> Why are you using a memcpy for the implementation?
> You may have a good reason, but since it is not obvious to me it may deserve a comment so it won't get remove in the future.
> rL LLVM
> EMAIL PREFERENCES
Because FloatToBits / DoubleToBits are in MathExtras.h which forms a
circular dependency with this header, and I believe the normal store
float to union and load integer is undefined behavior. The memcpy I
think avoids it
More information about the llvm-commits