When converting to integer, do bit manipulations in the destination
authorNeil Booth <neil@daikokuya.co.uk>
Thu, 1 Nov 2007 22:43:37 +0000 (22:43 +0000)
committerNeil Booth <neil@daikokuya.co.uk>
Thu, 1 Nov 2007 22:43:37 +0000 (22:43 +0000)
commitee7ae384f5d6067f1ca6d475b8630fe91ff2f6b6
treebbc32ceae892f4871639ea11e85ec0046d09c1bc
parentff37ccc570cd40dd2d4a0332b64a16171f51b1c2
When converting to integer, do bit manipulations in the destination
memory rather than in a copy of the APFloat.  This avoids problems
when the destination is wider than our significand and is cleaner.

Also provide deterministic values in all cases where conversion
fails, namely zero for NaNs and the minimal or maximal value
respectively for underflow or overflow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43626 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/APFloat.h
lib/Support/APFloat.cpp