aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Support/APFloat.cpp8
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp2
2 files changed, 3 insertions, 7 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp
index 128fee4f01..a65e55afb5 100644
--- a/lib/Support/APFloat.cpp
+++ b/lib/Support/APFloat.cpp
@@ -117,11 +117,6 @@ namespace {
&& "Compile-time arithmetic does not support these semantics");
}
- static inline bool
- isArithmeticOk(const llvm::fltSemantics &semantics) {
- return semantics.arithmeticOK;
- }
-
/* Return the value of a decimal exponent of the form
[+-]ddddddd.
@@ -1792,8 +1787,7 @@ APFloat::convertToSignExtendedInteger(integerPart *parts, unsigned int width,
const integerPart *src;
unsigned int dstPartsCount, truncatedBits;
- if (!isArithmeticOk(*semantics))
- return opInvalidOp;
+ assertArithmeticOK(*semantics);
*isExact = false;
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 128b19778f..fabbf6e19e 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -742,6 +742,8 @@ static bool useSIToFPInst(ConstantFP &InitV, ConstantFP &ExitV,
static bool convertToInt(const APFloat &APF, uint64_t *intVal) {
bool isExact = false;
+ if (&APF.getSemantics() == &APFloat::PPCDoubleDouble)
+ return false;
if (APF.convertToInteger(intVal, 32, APF.isNegative(),
APFloat::rmTowardZero, &isExact)
!= APFloat::opOK)