[llvm] [KnownFPClass] Fix canonicalize incorrectly dropping fcNegZero under positive-zero denormal mode (PR #202268)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 07:53:42 PDT 2026
================
@@ -228,8 +228,15 @@ KnownFPClass KnownFPClass::canonicalize(const KnownFPClass &KnownSrc,
if (DenormMode.Input == DenormalMode::PositiveZero ||
(DenormMode.Output == DenormalMode::PositiveZero &&
- DenormMode.Input == DenormalMode::IEEE))
- Known.knownNot(fcNegZero);
+ DenormMode.Input == DenormalMode::IEEE)) {
+ // -0.0 is not a subnormal, not governed by DenormalMode and canonicalize
+ // conserves its sign (canonicalize(-0.0) == -0.0).
----------------
arsenm wrote:
```suggestion
// -0.0 is not a subnormal and should not be flushed.
```
https://github.com/llvm/llvm-project/pull/202268
More information about the llvm-commits
mailing list