llvm.org GIT mirror llvm / 794a7db
Revert r60042. IndVarSimplify should check if APFloat is PPCDoubleDouble first before trying to convert it to an integer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60072 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
2 changed file(s) with 3 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
114114 assertArithmeticOK(const llvm::fltSemantics &semantics) {
115115 assert(semantics.arithmeticOK
116116 && "Compile-time arithmetic does not support these semantics");
117 }
118
119 static inline bool
120 isArithmeticOk(const llvm::fltSemantics &semantics) {
121 return semantics.arithmeticOK;
122117 }
123118
124119 /* Return the value of a decimal exponent of the form
17911786 const integerPart *src;
17921787 unsigned int dstPartsCount, truncatedBits;
17931788
1794 if (!isArithmeticOk(*semantics))
1795 return opInvalidOp;
1789 assertArithmeticOK(*semantics);
17961790
17971791 *isExact = false;
17981792
741741 static bool convertToInt(const APFloat &APF, uint64_t *intVal) {
742742
743743 bool isExact = false;
744 if (&APF.getSemantics() == &APFloat::PPCDoubleDouble)
745 return false;
744746 if (APF.convertToInteger(intVal, 32, APF.isNegative(),
745747 APFloat::rmTowardZero, &isExact)
746748 != APFloat::opOK)