[llvm-branch-commits] [llvm] [InstCombine] Fold exp2(uitofp x) to ldexp(1.0, x) with ninf (PR #227380)

Eli Friedman via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Sep 29 09:58:13 PDT 2026


https://github.com/efriedma-quic commented:

Should we add transform `exp2(uitofp x)` -> `ldexp(1.0, umin(x, SOME_LARGE_CONSTANT))` if we don't have ninf?

Please check that the exponent actually fits into an int, even if the check doesn't do anything useful for now.  Implicit assumptions make the code harder to understand and change.

https://github.com/llvm/llvm-project/pull/227380


More information about the llvm-branch-commits mailing list