[llvm] [APFloat]extract `fltSemantics::isRepresentableBy` to header (PR #122636)
Matthias Springer via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 12 11:24:51 PST 2025
================
@@ -290,6 +282,12 @@ const fltSemantics &APFloatBase::x87DoubleExtended() {
}
const fltSemantics &APFloatBase::Bogus() { return semBogus; }
+bool APFloatBase::isRepresentableBy(const fltSemantics &A,
+ const fltSemantics &B) {
+ return A.maxExponent <= B.maxExponent && A.minExponent >= B.minExponent &&
+ A.precision <= B.precision;
----------------
matthias-springer wrote:
I think this should take into account `hasZero` and `hasSignedRepr`. Or the documentation should make clear that it doesn't.
https://github.com/llvm/llvm-project/pull/122636
More information about the llvm-commits
mailing list