Files
Max Graey 39e30cc8a1 [KnowFPClass] Refactor fmul & fdiv (NFC) (#191651)
- Remove `0 * Inf ->  NaN` redundant check and a nan setting.

  The reason:
  ```rust
  1. Inf * Y   ->  {Inf, NaN}
  2.   0 * Y   ->  {Zero, NaN}
  3.   0 * Inf ->  NaN
  ```
But after `1.` and `2.` we already have `{Inf, NaN} ∩ {Zero, NaN} ->
NaN`
So `3.` is redundant and [can be
removed](https://github.com/llvm/llvm-project/pull/191651/changes#diff-eacbd8c8620db92a00453be14b3b433c618946ad7b57c10b039437641e9777c4L389):
```diff
   // +/-0 * +/-inf = nan
-  if ((KnownLHS.isKnownAlways(fcZero | fcNan) &&
-       KnownRHS.isKnownAlways(fcInf | fcNan)) ||
-      (KnownLHS.isKnownAlways(fcInf | fcNan) &&
-       KnownRHS.isKnownAlways(fcZero | fcNan)))
-    Known.knownNot(~fcNan);
```
- Group repeated twice sign inferring into `propagateXorSign` helper
- Add more conventional comments
2026-04-30 10:24:55 +01:00
..