mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 23:23:38 -04:00
[APFloat] Fix IsInteger() for DoubleAPFloat.
Previously, we would just assert instead. Differential Revision: https://reviews.llvm.org/D36961 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311351 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4363,10 +4363,7 @@ bool DoubleAPFloat::isLargest() const {
|
||||
|
||||
bool DoubleAPFloat::isInteger() const {
|
||||
assert(Semantics == &semPPCDoubleDouble && "Unexpected Semantics");
|
||||
APFloat Tmp(semPPCDoubleDoubleLegacy);
|
||||
(void)Tmp.add(Floats[0], rmNearestTiesToEven);
|
||||
(void)Tmp.add(Floats[1], rmNearestTiesToEven);
|
||||
return Tmp.isInteger();
|
||||
return Floats[0].isInteger() && Floats[1].isInteger();
|
||||
}
|
||||
|
||||
void DoubleAPFloat::toString(SmallVectorImpl<char> &Str,
|
||||
|
||||
Reference in New Issue
Block a user