[llvm-branch-commits] [llvm] [InstCombine] Fold exp2(uitofp iN x) to ldexp when N equals the width of int (PR #227380)
Harrison Hao via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Sep 30 01:21:59 PDT 2026
harrisonGPU wrote:
@efriedma-quic @ZERICO2005 Thanks for the suggestions! Updated: without ninf we now emit ldexp(1.0, umin(x, Emax + 1)), and with ninf we fold directly to ldexp(1.0, x). And I also added an explicit isIntN check. It always holds today (Emax + 1 <= 16384), but it keeps the fold safe if a wider FP type is ever added. :-)
https://github.com/llvm/llvm-project/pull/227380
More information about the llvm-branch-commits
mailing list