llvm-project
c1e8df3c - [InstCombine] Fold exp(subnormal) and exp(+inf) to x + 1.0 (#243862)

Commit
8 hours ago
[InstCombine] Fold exp(subnormal) and exp(+inf) to x + 1.0 (#243862) Fixes #243132 - Folds `exp(subnormal)` to `1.0` in `SimplifyDemandedUseFPClass` since any subnormal floating-point value evaluated with `exp`, `exp2`, or `exp10` rounds to `1.0` in default rounding mode. - Folds `exp(zero | subnormal | +inf | nan)` to `x + 1.0` (`fadd x, 1.0`). Note that `-inf` is excluded because `-inf + 1.0 = -inf != exp(-inf) = 0.0`. - Adds test coverage across `exp`, `exp2`, and `exp10` in `simplify-demanded-fpclass-exp.ll`.
Author
Parents
Loading