search for: mantissawidth

Displaying 1 result from an estimated 1 matches for "mantissawidth".

2015 Jul 06
5
[LLVMdev] Why can't comparisons with negative zero be simplified?
...res.cpp, routine InstCombiner::FoldFCmp_IntToFP_Cst, there are these lines: // Comparisons with zero are a special case where we know we won't lose // information. bool IsCmpZero = RHS.isPosZero(); // If the conversion would lose info, don't hack on this. if ((int)InputSize > MantissaWidth && !IsCmpZero) return nullptr; Why check for positive zero instead of checking for any kind of zero? My reading of IEEE 754-2008 is that floating-point comparison operations cannot distinguish a negative zero from a positive zero. Further supporting this is that fact that http://llvm...