[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)
Thorsten Schütt via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 7 10:53:06 PDT 2024
================
@@ -3518,13 +3542,17 @@ APInt IEEEFloat::convertIEEEFloatToAPInt() const {
myexponent = ::exponentZero(S) + bias;
mysignificand.fill(0);
} else if (category == fcInfinity) {
- if (S.nonFiniteBehavior == fltNonfiniteBehavior::NanOnly) {
+ if (S.nonFiniteBehavior == fltNonfiniteBehavior::NanOnly ||
+ S.nonFiniteBehavior == fltNonfiniteBehavior::NoNanInf) {
llvm_unreachable("semantics don't support inf!");
}
myexponent = ::exponentInf(S) + bias;
mysignificand.fill(0);
} else {
assert(category == fcNaN && "Unknown category!");
+ if (S.nonFiniteBehavior == fltNonfiniteBehavior::NoNanInf) {
----------------
tschuett wrote:
No redundant braces.
https://github.com/llvm/llvm-project/pull/94735
More information about the cfe-commits
mailing list