[llvm] [llubi] Initial support for floating-point numbers (PR #188453)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 26 08:00:14 PDT 2026
================
@@ -118,6 +118,41 @@ static AnyValue mulNoWrap(const APInt &LHS, const APInt &RHS, bool HasNSW,
return Res;
}
+static APFloat handleDenormal(APFloat Val,
+ DenormalMode::DenormalModeKind Mode) {
+ if (!Val.isDenormal())
+ return Val;
+ if (Mode == DenormalMode::PositiveZero)
+ return APFloat::getZero(Val.getSemantics(), false);
+ if (Mode == DenormalMode::PreserveSign)
+ return APFloat::getZero(Val.getSemantics(), Val.isNegative());
+ // Default case for IEEE, Dynamic, and Invalid
----------------
nikic wrote:
Hm, so this effectively treats Dynamic the same as IEEE. I guess this is fine given that we currently don't have a way that llubi supports to switch the mode. I'd make the comment more explicit to that effect though.
https://github.com/llvm/llvm-project/pull/188453
More information about the llvm-commits
mailing list