diff options
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp index 9e3cf30..dd4e7e2 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp @@ -58,7 +58,6 @@ namespace { // operators inevitably call FAddendCoef's constructor which is not cheap. void operator=(const FAddendCoef &A); void operator+=(const FAddendCoef &A); - void operator-=(const FAddendCoef &A); void operator*=(const FAddendCoef &S); bool isOne() const { return isInt() && IntVal == 1; } @@ -279,27 +278,6 @@ void FAddendCoef::operator+=(const FAddendCoef &That) { T.add(createAPFloatFromInt(T.getSemantics(), That.IntVal), RndMode); } -void FAddendCoef::operator-=(const FAddendCoef &That) { - enum APFloat::roundingMode RndMode = APFloat::rmNearestTiesToEven; - if (isInt() == That.isInt()) { - if (isInt()) - IntVal -= That.IntVal; - else - getFpVal().subtract(That.getFpVal(), RndMode); - return; - } - - if (isInt()) { - const APFloat &T = That.getFpVal(); - convertToFpType(T.getSemantics()); - getFpVal().subtract(T, RndMode); - return; - } - - APFloat &T = getFpVal(); - T.subtract(createAPFloatFromInt(T.getSemantics(), IntVal), RndMode); -} - void FAddendCoef::operator*=(const FAddendCoef &That) { if (That.isOne()) return; |