diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/lib/Support/APFloat.cpp @@ -4418,8 +4418,9 @@ return; } if (usesLayout(Semantics)) { + const fltSemantics& S = F.getSemantics(); new (&Double) - DoubleAPFloat(Semantics, APFloat(std::move(F), F.getSemantics()), + DoubleAPFloat(Semantics, APFloat(std::move(F), S), APFloat(semIEEEdouble)); return; }