[APFloat] Remove 'else' after return. NFC

Reviewers: kbarton, iteratee, hfinkel, echristo

Subscribers: mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D27934

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290232 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Shen
2016-12-21 02:39:21 +00:00
parent 1a6ed847ac
commit 40059176bf
2 changed files with 60 additions and 64 deletions
+15 -13
View File
@@ -4110,13 +4110,15 @@ void DoubleAPFloat::makeNaN(bool SNaN, bool Neg, const APInt *fill) {
APFloat::Storage::Storage(IEEEFloat F, const fltSemantics &Semantics) {
if (usesLayout<IEEEFloat>(Semantics)) {
new (&IEEE) IEEEFloat(std::move(F));
} else if (usesLayout<DoubleAPFloat>(Semantics)) {
return;
}
if (usesLayout<DoubleAPFloat>(Semantics)) {
new (&Double)
DoubleAPFloat(Semantics, APFloat(std::move(F), F.getSemantics()),
APFloat(semIEEEdouble));
} else {
llvm_unreachable("Unexpected semantics");
return;
}
llvm_unreachable("Unexpected semantics");
}
APFloat::opStatus APFloat::convertFromString(StringRef Str, roundingMode RM) {
@@ -4135,24 +4137,24 @@ APFloat::opStatus APFloat::convert(const fltSemantics &ToSemantics,
if (&getSemantics() == &ToSemantics)
return opOK;
if (usesLayout<IEEEFloat>(getSemantics()) &&
usesLayout<IEEEFloat>(ToSemantics)) {
usesLayout<IEEEFloat>(ToSemantics))
return U.IEEE.convert(ToSemantics, RM, losesInfo);
} else if (usesLayout<IEEEFloat>(getSemantics()) &&
usesLayout<DoubleAPFloat>(ToSemantics)) {
if (usesLayout<IEEEFloat>(getSemantics()) &&
usesLayout<DoubleAPFloat>(ToSemantics)) {
assert(&ToSemantics == &semPPCDoubleDouble);
auto Ret = U.IEEE.convert(semPPCDoubleDoubleImpl, RM, losesInfo);
*this = APFloat(
DoubleAPFloat(semPPCDoubleDouble, std::move(*this), APFloat(semIEEEdouble)),
ToSemantics);
*this = APFloat(DoubleAPFloat(semPPCDoubleDouble, std::move(*this),
APFloat(semIEEEdouble)),
ToSemantics);
return Ret;
} else if (usesLayout<DoubleAPFloat>(getSemantics()) &&
usesLayout<IEEEFloat>(ToSemantics)) {
}
if (usesLayout<DoubleAPFloat>(getSemantics()) &&
usesLayout<IEEEFloat>(ToSemantics)) {
auto Ret = getIEEE().convert(ToSemantics, RM, losesInfo);
*this = APFloat(std::move(getIEEE()), ToSemantics);
return Ret;
} else {
llvm_unreachable("Unexpected semantics");
}
llvm_unreachable("Unexpected semantics");
}
APFloat APFloat::getAllOnesValue(unsigned BitWidth, bool isIEEE) {