[PATCH] D46645: [APFloat] Set losesInfo on no-op convert
Sven van Haastregt via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 11 02:49:32 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL332087: [APFloat] Set losesInfo on no-op convert (authored by svenvh, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46645?vs=145937&id=146291#toc
Repository:
rL LLVM
https://reviews.llvm.org/D46645
Files:
llvm/trunk/lib/Support/APFloat.cpp
Index: llvm/trunk/lib/Support/APFloat.cpp
===================================================================
--- llvm/trunk/lib/Support/APFloat.cpp
+++ llvm/trunk/lib/Support/APFloat.cpp
@@ -4443,8 +4443,10 @@
APFloat::opStatus APFloat::convert(const fltSemantics &ToSemantics,
roundingMode RM, bool *losesInfo) {
- if (&getSemantics() == &ToSemantics)
+ if (&getSemantics() == &ToSemantics) {
+ *losesInfo = false;
return opOK;
+ }
if (usesLayout<IEEEFloat>(getSemantics()) &&
usesLayout<IEEEFloat>(ToSemantics))
return U.IEEE.convert(ToSemantics, RM, losesInfo);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46645.146291.patch
Type: text/x-patch
Size: 631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180511/73813470/attachment.bin>
More information about the llvm-commits
mailing list