[llvm] [KnownFPClass] Correct denormal handling for `KnownFPClass::roundToIntegral` (PR #219700)
Eric Ross via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 13 16:01:16 PDT 2026
================
@@ -467,10 +467,12 @@ struct KnownFPClass {
/// Propagate known class for rounding intrinsics (trunc, floor, ceil, rint,
/// nearbyint, round, roundeven). This is trunc if \p IsTrunc. \p
- /// IsMultiUnitFPType if this is for a multi-unit floating-point type.
- LLVM_ABI static KnownFPClass roundToIntegral(const KnownFPClass &Src,
- bool IsTrunc,
- bool IsMultiUnitFPType);
+ /// IsKnownNeverMultiUnitFPType if this is known to never be for a multi-unit
+ /// floating-point type.
+ LLVM_ABI static KnownFPClass
+ roundToIntegral(const KnownFPClass &Src, bool IsTrunc,
+ bool IsKnownNeverMultiUnitFPType,
----------------
ZERICO2005 wrote:
My thinking was:
- `IsMultiUnitFPType` implies that additional deductions are possible for `ppcf128`.
- `IsKnownNeverMultiUnitFPType` implies that additional deductions are possible for types that are **not** `ppcf128`. Which I think better describes why we need this parameter for `KnownFPClass::roundToIntegeral`.
I was also planning on doing something similar for `KnownFPClass::log` to fix some incorrect deductions specifically for the `ppcf128` type.
An alternative would be to pass the `FltSemantics` into the function.
https://github.com/llvm/llvm-project/pull/219700
More information about the llvm-commits
mailing list