diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp index 9035017a9c4..24005c1890c 100644 --- a/lib/Support/APFloat.cpp +++ b/lib/Support/APFloat.cpp @@ -4443,8 +4443,10 @@ APFloat::APFloat(const fltSemantics &Semantics, StringRef S) APFloat::opStatus APFloat::convert(const fltSemantics &ToSemantics, roundingMode RM, bool *losesInfo) { - if (&getSemantics() == &ToSemantics) + if (&getSemantics() == &ToSemantics) { + *losesInfo = false; return opOK; + } if (usesLayout(getSemantics()) && usesLayout(ToSemantics)) return U.IEEE.convert(ToSemantics, RM, losesInfo);